UNPKG

619 BTypeScriptView Raw
1/**
2 * Lazy String holder for JSON typed contents.
3 */
4interface StringWrapper {
5 new (arg: any): String;
6}
7/**
8 * Because of https://github.com/microsoft/tslib/issues/95,
9 * TS 'extends' shim doesn't support extending native types like String.
10 * So here we create StringWrapper that duplicate everything from String
11 * class including its prototype chain. So we can extend from here.
12 */
13export declare const StringWrapper: StringWrapper;
14export declare class LazyJsonString extends StringWrapper {
15 deserializeJSON(): any;
16 toJSON(): string;
17 static fromObject(object: any): LazyJsonString;
18}
19export {};