sussudio
Version:
An unofficial VS Code Internal API
12 lines (11 loc) • 1 kB
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 { JSONPath } from './json';
import { Edit, FormattingOptions } from './jsonFormatter';
export declare function removeProperty(text: string, path: JSONPath, formattingOptions: FormattingOptions): Edit[];
export declare function setProperty(text: string, originalPath: JSONPath, value: any, formattingOptions: FormattingOptions, getInsertionIndex?: (properties: string[]) => number): Edit[];
export declare function withFormatting(text: string, edit: Edit, formattingOptions: FormattingOptions): Edit[];
export declare function applyEdit(text: string, edit: Edit): string;
export declare function applyEdits(text: string, edits: Edit[]): string;