base bt
This commit is contained in:
parent
c43c192a3e
commit
dffc73c30f
18 changed files with 525 additions and 134 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue