UNPKG

nowjs-core

Version:

NowCanDo Javascript Core [nowjs-core] is a library written by TypeScript code maintains under Apache 2.0 licence

65 lines (64 loc) 4.53 kB
export declare const PROPERTY_METADATA_KEY: unique symbol; export declare const PROPERTY_PRESENTATION_KEY: unique symbol; export declare const OBJECT_DISPLAYNAME_METADATA_KEY: unique symbol; export declare const OBJECT_DISPLAYSHORTNAME_METADATA_KEY: unique symbol; export declare const OBJECT_DISPLAYHINT_METADATA_KEY: unique symbol; export declare const OBJECT_DISPLAYORDER_METADATA_KEY: unique symbol; export declare type StringFormatType = ((name: string, ...args: any[]) => string) | string; export interface IJsonSchemaDefinitionValidator { [key: string]: any; } export interface JsonSchemaDefinitionDisplay { displayName?: StringFormatType; displayShortName?: StringFormatType; displayHintName?: StringFormatType; displayOrder?: number; } export interface JsonSchemaDefinitionItem { display?: JsonSchemaDefinitionDisplay; validators?: IJsonSchemaDefinitionValidator; } export interface JsonSchemaDefinition { [key: string]: JsonSchemaDefinitionItem; } export declare function getReflectdDisplayName(target: any, propertyName: string, defaultName: string): string; export declare function displayName(name: StringFormatType): (target: any, propertyName: string, descriptor: TypedPropertyDescriptor<any>) => void; export declare function displayShortName(name: StringFormatType): (target: any, propertyName: string, descriptor: TypedPropertyDescriptor<any>) => void; export declare function displayHint(hint: StringFormatType): (target: any, propertyName: string, descriptor: TypedPropertyDescriptor<any>) => void; export declare function displayOrder(num: number): (target: any, propertyName: string, descriptor: TypedPropertyDescriptor<any>) => void; export declare function sealed(constructor: Function): void; export declare function classDecorator<T extends new (...args: any[]) => {}>(constructor: T): { new (...args: any[]): { newProperty: string; hello: string; }; } & T; export declare function enumerable(value: boolean): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void; export declare function configurable(value: boolean): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void; export declare function propertySet<T>(target: any, propertyKey: string, descriptor: TypedPropertyDescriptor<T>): void; export declare function readonlyObject<TFunction extends Function>(Target: TFunction): TFunction; export declare function defineProperty(target: object, propertyKey: string): void; export declare function extend<T, U>(first: T, second: U): T & U; export declare function getProperty<T, K extends keyof T>(o: T, name: K): T[K]; export declare function setProperty<T, K extends keyof T>(obj: T, key: K, value: T[K]): void; export declare function getObjetctNestedPath(theObject: any, path: string, separator?: string): any; export declare function getObjectLastParentOfPath(theObject: any, path: string, separator: string): any; export declare function getObjectLastKeyOfPath(theObject: any, path: string, separator: string): string; export declare function isObjectType(item: any): boolean; export declare function deepAssign<T, U>(target: T, source1: U): T & U; export declare function deepAssign<T, U, V>(target: T, source1: U, source2: V): T & U & V; export declare function deepAssign<T, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W; export declare function deepAssign<T, U, V, W, X>(target: T, source1: U, source2: V, source3: W, source4: X): T & U & V & W & X; export declare function deepAssign<T, U, V, W, X, Y>(target: T, source1: U, source2: V, source3: W, source4: X, source5: Y): T & U & V & W & X & Y; export declare function deepAssign<T, U, V, W, X, Y, Z>(target: T, source1: U, source2: V, source3: W, source4: X, source5: Y, source6: Z): T & U & V & W & X & Y & Z; export declare function deepAssign<T>(target: T, ...sources: any[]): T & any; export declare function cloneObject<T>(obj: T): T; export declare function toCloneObject<T>(target: T): T; export declare function toDeepAssign<T>(target: T, ...sources: any[]): T; export declare function deepEqual(x: Record<string, any>, y: Record<string, any>): boolean; export declare function createInstance<T>(c: new () => T): T; declare const groupBy: (fn: Function) => (list: any[]) => any; declare const values: (obj: object) => any[]; declare const pipe: (f1: Function, ...fns: Function[]) => (...args: any[]) => any; declare const path: (nodes: any[]) => (obj: object) => any; export { groupBy, values, pipe, path };