sussudio
Version:
An unofficial VS Code Internal API
19 lines (18 loc) • 935 B
text/typescript
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { VSBuffer } from "./buffer.mjs";
import { URI, UriComponents } from "./uri.mjs";
import { MarshalledId } from './marshallingIds';
export declare function stringify(obj: any): string;
export declare function parse(text: string): any;
export interface MarshalledObject {
$mid: MarshalledId;
}
type Deserialize<T> = T extends UriComponents ? URI : T extends VSBuffer ? VSBuffer : T extends object ? Revived<T> : T;
export type Revived<T> = {
[K in keyof T]: Deserialize<T[K]>;
};
export declare function revive<T = any>(obj: any, depth?: number): Revived<T>;
export {};