@foxpage/foxpage-component-shared
Version:
foxpage component shared
14 lines (13 loc) • 562 B
TypeScript
export declare const getKey: <T = any>(obj: {
[key: string]: any;
}, key: string) => T | undefined;
export declare function caseStyle(input: string): string;
export declare function promiseTimeout<T = any>(promise: Promise<T>, timeout?: number): Promise<T>;
export declare function wrapPromise(val: any): Promise<any>;
/**
* can not set process.env value to `undefined`, it will stringify to "undefined"
* if val not a valid string, delete this env
* @param name
* @param val
*/
export declare const setProcessEnv: (name: string, val?: string) => void;