@xmobitea/gn-server
Version:
GearN Server by XmobiTea (Pro)
257 lines (256 loc) • 8 kB
TypeScript
type GNDataType = string | number | boolean | null | GNArray | GNHashtable;
interface IGNData {
/**
* Executes the to data workflow.
* @returns Returns the operation result.
*/
toData(): any;
}
export declare abstract class GNData implements IGNData {
/**
* Executes the get workflow.
* @param k Provides the k value used by this operation.
* @param def Provides the def value used by this operation.
* @returns Returns the operation result.
*/
protected get<T>(k: string | number, def?: T): T;
/**
* Executes the clear workflow.
*/
abstract clear(): void;
/**
* Executes the remove workflow.
* @param k Provides the k value used by this operation.
* @returns Returns the operation result.
*/
abstract remove(k: string | number): boolean;
/**
* Executes the count workflow.
* @returns Returns the operation result.
*/
abstract count(): number;
/**
* Returns the boolean.
* @param k Provides the k value used by this operation.
* @param def Provides the def value used by this operation.
* @returns Returns the boolean.
*/
getBoolean(k: string | number, def?: boolean): boolean;
/**
* Returns the object.
* @param k Provides the k value used by this operation.
* @param def Provides the def value used by this operation.
* @returns Returns the object.
*/
getObject(k: string | number, def?: object): object;
/**
* Returns the string.
* @param k Provides the k value used by this operation.
* @param def Provides the def value used by this operation.
* @returns Returns the string.
*/
getString(k: string | number, def?: string): string;
/**
* Returns the number.
* @param k Provides the k value used by this operation.
* @param def Provides the def value used by this operation.
* @returns Returns the number.
*/
getNumber(k: string | number, def?: number): number;
/**
* Returns the GearN hashtable.
* @param k Provides the k value used by this operation.
* @param def Provides the def value used by this operation.
* @returns Returns the GearN hashtable.
*/
getGNHashtable(k: string | number, def?: GNHashtable): GNHashtable;
/**
* Returns the GearN array.
* @param k Provides the k value used by this operation.
* @param def Provides the def value used by this operation.
* @returns Returns the GearN array.
*/
getGNArray(k: string | number, def?: GNArray): GNArray;
/**
* Creates the GearN hashtable from object.
* @param value Provides the value value used by this operation.
* @returns Returns the operation result.
*/
private static createGNHashtableFromObject;
/**
* Creates the GearN array from array.
* @param value Provides the value value used by this operation.
* @returns Returns the operation result.
*/
private static createGNArrayFromArray;
/**
* Creates the use data from origin data.
* @param value Provides the value value used by this operation.
* @returns Returns the operation result.
*/
protected static createUseDataFromOriginData(value: any): GNDataType;
/**
* Creates the data from use data.
* @param value Provides the value value used by this operation.
* @returns Returns the operation result.
*/
protected static createDataFromUseData(value: GNDataType): any;
/**
* Executes the to data workflow.
* @returns Returns the operation result.
*/
abstract toData(): any;
}
export declare class GNHashtableBuilder {
private dict;
/**
* Executes the add workflow.
* @param k Provides the k value used by this operation.
* @param value Provides the value value used by this operation.
* @returns Returns the operation result.
*/
add(k: string, value: any): GNHashtableBuilder;
/**
* Adds the all.
* @param dict Provides the dict value used by this operation.
*/
addAll(dict: {
[k: string]: any;
}): this;
/**
* Initializes a new GearN hashtable builder instance.
*/
constructor();
/**
* Builds the configured instance.
* @returns Returns the built GearN hashtable.
*/
build(): GNHashtable;
}
export declare class GNHashtable extends GNData {
private dict;
/**
* Executes the clear workflow.
*/
clear(): void;
/**
* Executes the remove workflow.
* @param k Provides the k value used by this operation.
* @returns Returns the operation result.
*/
remove(k: string): boolean;
/**
* Executes the count workflow.
* @returns Returns the operation result.
*/
count(): number;
/**
* Executes the contains key workflow.
* @param k Provides the k value used by this operation.
* @returns Returns the operation result.
*/
containsKey(k: string): boolean;
/**
* Executes the get workflow.
* @param k Provides the k value used by this operation.
* @param def Provides the def value used by this operation.
* @returns Returns the operation result.
*/
protected get<T>(k: string, def?: T): T;
/**
* Executes the add workflow.
* @param k Provides the k value used by this operation.
* @param value Provides the value value used by this operation.
*/
add(k: string, value: any): void;
/**
* Executes the to data workflow.
* @returns Returns the operation result.
*/
toData(): {};
/**
* Creates a new builder instance.
* @returns Returns a new builder instance.
*/
static builder(): GNHashtableBuilder;
/**
* Executes the to string workflow.
* @returns Returns the operation result.
*/
toString(): string;
}
export declare class GNArrayBuilder {
private array;
/**
* Executes the add workflow.
* @param value Provides the value value used by this operation.
* @returns Returns the operation result.
*/
add(value: any): GNArrayBuilder;
/**
* Adds the all.
* @param array Provides the array value used by this operation.
* @returns Returns the operation result.
*/
addAll(array: any[]): GNArrayBuilder;
/**
* Builds the configured instance.
* @returns Returns the built GearN array.
*/
build(): GNArray;
/**
* Initializes a new GearN array builder instance.
*/
constructor();
}
export declare class GNArray extends GNData {
private array;
/**
* Executes the clear workflow.
*/
clear(): void;
/**
* Executes the index of workflow.
* @param item Provides the item value used by this operation.
* @returns Returns the operation result.
*/
indexOf(item: GNDataType): number;
/**
* Executes the remove workflow.
* @param k Provides the k value used by this operation.
* @returns Returns the operation result.
*/
remove(k: number): boolean;
/**
* Executes the count workflow.
* @returns Returns the operation result.
*/
count(): number;
/**
* Executes the get workflow.
* @param k Provides the k value used by this operation.
* @param def Provides the def value used by this operation.
* @returns Returns the operation result.
*/
protected get<T>(k: number, def?: T): T;
/**
* Executes the add workflow.
* @param value Provides the value value used by this operation.
*/
add(value: any): void;
/**
* Executes the to data workflow.
*/
toData(): any[];
/**
* Creates a new builder instance.
* @returns Returns a new builder instance.
*/
static builder(): GNArrayBuilder;
/**
* Executes the to string workflow.
* @returns Returns the operation result.
*/
toString(): string;
}
export {};