there repository
This commit is contained in:
parent
71cd1061cb
commit
5d0e5f7f1c
10 changed files with 257 additions and 2 deletions
|
@ -1,19 +1,27 @@
|
|||
import { ArrayExtensions } from "./array";
|
||||
import { MapExtensions } from "./map";
|
||||
import { StringExtensions } from "./string";
|
||||
|
||||
export type CallBackFunction = <T>(value: T) => void;
|
||||
|
||||
declare global {
|
||||
interface Array<T> {
|
||||
// @strict: The parameter is determined whether the arrays must be exactly the same in content and order of this relationship or simply follow the same requirements.
|
||||
equals(array: Array<T>, strict: boolean): boolean;
|
||||
lastElement(): T | undefined;
|
||||
isEmpty(): boolean;
|
||||
isNotEmpty():boolean;
|
||||
isNotEmpty(): boolean;
|
||||
hasIncludeElement(element: T): boolean;
|
||||
}
|
||||
interface String {
|
||||
isEmpty(): boolean;
|
||||
}
|
||||
interface Map<K, V> {
|
||||
addValueOrMakeCallback(key: K, value: V, callBack: CallBackFunction): void;
|
||||
}
|
||||
}
|
||||
export const extensions = () => {
|
||||
ArrayExtensions();
|
||||
StringExtensions();
|
||||
MapExtensions();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue