UNPKG

@sussudio/base

Version:

Internal APIs for VS Code's utilities and user interface building blocks.

20 lines (18 loc) 930 B
/*--------------------------------------------------------------------------------------------- * 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 {};