source: trip-planner-front/node_modules/@angular-devkit/core/src/json/interface.d.ts

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 2.4 KB
Line 
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8export interface Position {
9 readonly offset: number;
10 readonly line: number;
11 readonly character: number;
12}
13export declare type JsonAstNode = JsonAstNumber | JsonAstString | JsonAstIdentifier | JsonAstArray | JsonAstObject | JsonAstConstantFalse | JsonAstConstantNull | JsonAstConstantTrue;
14export interface JsonAstNodeBase {
15 readonly start: Position;
16 readonly end: Position;
17 readonly text: string;
18 readonly comments?: (JsonAstComment | JsonAstMultilineComment)[];
19}
20export interface JsonAstNumber extends JsonAstNodeBase {
21 readonly kind: 'number';
22 readonly value: number;
23}
24export interface JsonAstString extends JsonAstNodeBase {
25 readonly kind: 'string';
26 readonly value: string;
27}
28export interface JsonAstIdentifier extends JsonAstNodeBase {
29 readonly kind: 'identifier';
30 readonly value: string;
31}
32export interface JsonArray extends Array<JsonValue> {
33}
34export interface JsonAstArray extends JsonAstNodeBase {
35 readonly kind: 'array';
36 readonly elements: JsonAstNode[];
37 readonly value: JsonArray;
38}
39export interface JsonObject {
40 [prop: string]: JsonValue;
41}
42export interface JsonAstKeyValue extends JsonAstNodeBase {
43 readonly kind: 'keyvalue';
44 readonly key: JsonAstString | JsonAstIdentifier;
45 readonly value: JsonAstNode;
46}
47export interface JsonAstObject extends JsonAstNodeBase {
48 readonly kind: 'object';
49 readonly properties: JsonAstKeyValue[];
50 readonly value: JsonObject;
51}
52export interface JsonAstConstantFalse extends JsonAstNodeBase {
53 readonly kind: 'false';
54 readonly value: false;
55}
56export interface JsonAstConstantNull extends JsonAstNodeBase {
57 readonly kind: 'null';
58 readonly value: null;
59}
60export interface JsonAstConstantTrue extends JsonAstNodeBase {
61 readonly kind: 'true';
62 readonly value: true;
63}
64export interface JsonAstMultilineComment extends JsonAstNodeBase {
65 readonly kind: 'multicomment';
66 readonly content: string;
67}
68export interface JsonAstComment extends JsonAstNodeBase {
69 readonly kind: 'comment';
70 readonly content: string;
71}
72export declare type JsonValue = JsonAstNode['value'];
73export declare function isJsonObject(value: JsonValue): value is JsonObject;
74export declare function isJsonArray(value: JsonValue): value is JsonArray;
Note: See TracBrowser for help on using the repository browser.