there repository

This commit is contained in:
IDONTSUDO 2023-12-10 21:44:41 +03:00
parent 71cd1061cb
commit 5d0e5f7f1c
10 changed files with 257 additions and 2 deletions

View file

@ -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();
};