UNPKG

593 BTypeScriptView Raw
1import { JsonValue } from '@angular-devkit/core';
2import { Tree } from '@angular-devkit/schematics';
3export type InsertionIndex = (properties: string[]) => number;
4export type JSONPath = (string | number)[];
5export declare class JSONFile {
6 private readonly host;
7 private readonly path;
8 content: string;
9 constructor(host: Tree, path: string);
10 private _jsonAst;
11 private get JsonAst();
12 get(jsonPath: JSONPath): unknown;
13 modify(jsonPath: JSONPath, value: JsonValue | undefined, insertInOrder?: InsertionIndex | false): void;
14 remove(jsonPath: JSONPath): void;
15}