This commit is contained in:
IDONTSUDO 2024-02-27 18:48:35 +03:00
parent c43c192a3e
commit dffc73c30f
18 changed files with 525 additions and 134 deletions

View file

@ -4,8 +4,12 @@ import { NumberExtensions } from "./number";
import { StringExtensions } from "./string";
export type CallBackVoidFunction = <T>(value: T) => void;
export type CallBackStringVoidFunction = (value: string) => void;
export type CallBackEventTarget = (value: EventTarget) => void;
export type OptionalProperties<T> = {
[P in keyof T]?: T[P];
};
declare global {
interface Array<T> {
@ -25,8 +29,12 @@ declare global {
}
interface Map<K, V> {
addValueOrMakeCallback(key: K, value: V, callBack: CallBackVoidFunction): void;
getKeyFromValueIsExists(value: V): K | undefined;
overrideValue(key: K, value: OptionalProperties<V>): void;
keysToJson(): string;
toArray(): V[];
getPredicateValue(callBack: (value: V) => boolean): K[];
}
interface Vector3 {}
}
export const extensions = () => {
ArrayExtensions();