@dbml/parse 7.0.0 → 7.1.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dbml-parse.js +16 -16
- package/dist/dbml-parse.mjs +5539 -5355
- package/dist/src/compiler/index.d.ts +21 -21
- package/dist/src/compiler/queries/container/element.d.ts +1 -1
- package/dist/src/compiler/queries/container/index.d.ts +5 -5
- package/dist/src/compiler/queries/container/scope.d.ts +1 -1
- package/dist/src/compiler/queries/container/stack.d.ts +1 -1
- package/dist/src/compiler/queries/container/token.d.ts +1 -1
- package/dist/src/compiler/queries/{parse.d.ts → legacy/parse.d.ts} +6 -6
- package/dist/src/compiler/queries/{symbol.d.ts → legacy/symbol.d.ts} +4 -4
- package/dist/src/compiler/queries/{token.d.ts → legacy/token.d.ts} +2 -2
- package/dist/src/compiler/queries/transform/index.d.ts +4 -4
- package/dist/src/compiler/queries/transform/utils.d.ts +2 -2
- package/dist/src/constants.d.ts +4 -0
- package/dist/src/core/analyzer/analyzer.d.ts +3 -3
- package/dist/src/core/analyzer/binder/binder.d.ts +3 -3
- package/dist/src/core/analyzer/binder/elementBinder/checks.d.ts +2 -2
- package/dist/src/core/analyzer/binder/elementBinder/custom.d.ts +4 -4
- package/dist/src/core/analyzer/binder/elementBinder/diagramView.d.ts +4 -4
- package/dist/src/core/analyzer/binder/elementBinder/enum.d.ts +4 -4
- package/dist/src/core/analyzer/binder/elementBinder/indexes.d.ts +4 -4
- package/dist/src/core/analyzer/binder/elementBinder/note.d.ts +4 -4
- package/dist/src/core/analyzer/binder/elementBinder/project.d.ts +4 -4
- package/dist/src/core/analyzer/binder/elementBinder/records.d.ts +4 -4
- package/dist/src/core/analyzer/binder/elementBinder/ref.d.ts +4 -4
- package/dist/src/core/analyzer/binder/elementBinder/table.d.ts +4 -4
- package/dist/src/core/analyzer/binder/elementBinder/tableGroup.d.ts +4 -4
- package/dist/src/core/analyzer/binder/elementBinder/tablePartial.d.ts +4 -4
- package/dist/src/core/analyzer/binder/types.d.ts +1 -1
- package/dist/src/core/analyzer/binder/utils.d.ts +5 -5
- package/dist/src/core/analyzer/utils.d.ts +15 -18
- package/dist/src/core/analyzer/validator/elementValidators/checks.d.ts +5 -5
- package/dist/src/core/analyzer/validator/elementValidators/custom.d.ts +5 -5
- package/dist/src/core/analyzer/validator/elementValidators/diagramView.d.ts +5 -5
- package/dist/src/core/analyzer/validator/elementValidators/enum.d.ts +5 -5
- package/dist/src/core/analyzer/validator/elementValidators/indexes.d.ts +5 -5
- package/dist/src/core/analyzer/validator/elementValidators/note.d.ts +5 -5
- package/dist/src/core/analyzer/validator/elementValidators/project.d.ts +5 -5
- package/dist/src/core/analyzer/validator/elementValidators/records.d.ts +5 -5
- package/dist/src/core/analyzer/validator/elementValidators/ref.d.ts +5 -5
- package/dist/src/core/analyzer/validator/elementValidators/table.d.ts +5 -5
- package/dist/src/core/analyzer/validator/elementValidators/tableGroup.d.ts +5 -5
- package/dist/src/core/analyzer/validator/elementValidators/tablePartial.d.ts +5 -5
- package/dist/src/core/analyzer/validator/types.d.ts +1 -1
- package/dist/src/core/analyzer/validator/utils.d.ts +9 -10
- package/dist/src/core/analyzer/validator/validator.d.ts +3 -3
- package/dist/src/core/interpreter/elementInterpreter/diagramView.d.ts +2 -2
- package/dist/src/core/interpreter/elementInterpreter/enum.d.ts +2 -2
- package/dist/src/core/interpreter/elementInterpreter/project.d.ts +2 -2
- package/dist/src/core/interpreter/elementInterpreter/ref.d.ts +2 -2
- package/dist/src/core/interpreter/elementInterpreter/sticky_note.d.ts +2 -2
- package/dist/src/core/interpreter/elementInterpreter/table.d.ts +2 -2
- package/dist/src/core/interpreter/elementInterpreter/tableGroup.d.ts +2 -2
- package/dist/src/core/interpreter/elementInterpreter/tablePartial.d.ts +2 -2
- package/dist/src/core/interpreter/interpreter.d.ts +4 -3
- package/dist/src/core/interpreter/records/index.d.ts +2 -2
- package/dist/src/core/interpreter/records/utils/constraints/fk.d.ts +1 -1
- package/dist/src/core/interpreter/records/utils/constraints/helper.d.ts +3 -2
- package/dist/src/core/interpreter/records/utils/constraints/pk.d.ts +1 -1
- package/dist/src/core/interpreter/records/utils/constraints/unique.d.ts +1 -1
- package/dist/src/core/interpreter/records/utils/data/sqlTypes.d.ts +1 -1
- package/dist/src/core/interpreter/records/utils/data/values.d.ts +2 -2
- package/dist/src/core/interpreter/types.d.ts +6 -228
- package/dist/src/core/interpreter/utils.d.ts +6 -5
- package/dist/src/core/lexer/lexer.d.ts +5 -3
- package/dist/src/core/lexer/utils.d.ts +1 -1
- package/dist/src/core/parser/contextStack.d.ts +1 -1
- package/dist/src/core/parser/factory.d.ts +5 -3
- package/dist/src/core/parser/parser.d.ts +5 -4
- package/dist/src/core/parser/utils.d.ts +6 -7
- package/dist/src/core/{errors.d.ts → types/errors.d.ts} +5 -2
- package/dist/src/core/types/filepath.d.ts +26 -0
- package/dist/src/core/types/index.d.ts +7 -0
- package/dist/src/core/types/internable.d.ts +20 -0
- package/dist/src/core/types/module.d.ts +9 -0
- package/dist/src/core/{parser → types}/nodes.d.ts +49 -38
- package/dist/src/core/types/report.d.ts +18 -0
- package/dist/src/core/types/schemaJson.d.ts +243 -0
- package/dist/src/core/{analyzer → types}/symbol/factory.d.ts +1 -1
- package/dist/src/core/types/symbol/index.d.ts +5 -0
- package/dist/src/core/{analyzer → types}/symbol/symbolIndex.d.ts +3 -4
- package/dist/src/core/types/symbol/symbols.d.ts +122 -0
- package/dist/src/core/{analyzer → types}/symbol/utils.d.ts +1 -1
- package/dist/src/core/{lexer → types}/tokens.d.ts +5 -3
- package/dist/src/core/utils/array.d.ts +1 -0
- package/dist/src/core/utils/chars.d.ts +4 -0
- package/dist/src/core/utils/enum.d.ts +1 -0
- package/dist/src/core/utils/numbers.d.ts +3 -0
- package/dist/src/core/utils/span.d.ts +6 -0
- package/dist/src/index.d.ts +9 -9
- package/dist/src/services/definition/provider.d.ts +1 -1
- package/dist/src/services/index.d.ts +3 -3
- package/dist/src/services/monarch.d.ts +1 -1
- package/dist/src/services/references/provider.d.ts +1 -1
- package/dist/src/services/suggestions/provider.d.ts +1 -1
- package/dist/src/services/suggestions/recordRowSnippet.d.ts +1 -1
- package/dist/src/services/suggestions/utils.d.ts +5 -5
- package/dist/src/services/types.d.ts +1 -1
- package/dist/src/services/utils.d.ts +1 -1
- package/package.json +2 -2
- package/dist/__tests__/examples/binder/binder.test.d.ts +0 -1
- package/dist/__tests__/examples/binder/records.test.d.ts +0 -1
- package/dist/__tests__/examples/compiler/applyTextEdits.test.d.ts +0 -1
- package/dist/__tests__/examples/compiler/identifierUtils.test.d.ts +0 -1
- package/dist/__tests__/examples/compiler/renameTable.test.d.ts +0 -1
- package/dist/__tests__/examples/compiler/splitQualifiedIdentifier.test.d.ts +0 -1
- package/dist/__tests__/examples/compiler/stringUtils.test.d.ts +0 -1
- package/dist/__tests__/examples/compiler/syncDiagramView.test.d.ts +0 -1
- package/dist/__tests__/examples/interpreter/interpreter.test.d.ts +0 -1
- package/dist/__tests__/examples/interpreter/record/data.test.d.ts +0 -1
- package/dist/__tests__/examples/interpreter/record/fk.test.d.ts +0 -1
- package/dist/__tests__/examples/interpreter/record/increment.test.d.ts +0 -1
- package/dist/__tests__/examples/interpreter/record/multi_records.test.d.ts +0 -1
- package/dist/__tests__/examples/interpreter/record/pk.test.d.ts +0 -1
- package/dist/__tests__/examples/interpreter/record/table_partial.test.d.ts +0 -1
- package/dist/__tests__/examples/interpreter/record/type_compatibility.test.d.ts +0 -1
- package/dist/__tests__/examples/interpreter/record/unique.test.d.ts +0 -1
- package/dist/__tests__/examples/lexer/lexer.test.d.ts +0 -1
- package/dist/__tests__/examples/lexer/scientific-notation.test.d.ts +0 -1
- package/dist/__tests__/examples/parser/parser.test.d.ts +0 -1
- package/dist/__tests__/examples/services/definition/general.test.d.ts +0 -1
- package/dist/__tests__/examples/services/definition/records.test.d.ts +0 -1
- package/dist/__tests__/examples/services/references/general.test.d.ts +0 -1
- package/dist/__tests__/examples/services/references/records.test.d.ts +0 -1
- package/dist/__tests__/examples/services/service_utils.test.d.ts +0 -1
- package/dist/__tests__/examples/services/suggestions/general.test.d.ts +0 -1
- package/dist/__tests__/examples/services/suggestions/suggestions_diagramview.test.d.ts +0 -1
- package/dist/__tests__/examples/services/suggestions/suggestions_records.test.d.ts +0 -1
- package/dist/__tests__/examples/validator/records.test.d.ts +0 -1
- package/dist/__tests__/examples/validator/validator.test.d.ts +0 -1
- package/dist/__tests__/examples/wildcard/wildcard.test.d.ts +0 -1
- package/dist/__tests__/fuzz/interpreter.test.d.ts +0 -1
- package/dist/__tests__/fuzz/parser.test.d.ts +0 -1
- package/dist/__tests__/fuzz/services.test.d.ts +0 -1
- package/dist/__tests__/properties/lexer.test.d.ts +0 -1
- package/dist/__tests__/properties/parser.test.d.ts +0 -1
- package/dist/__tests__/snapshots/binder/binder.test.d.ts +0 -1
- package/dist/__tests__/snapshots/interpreter/interpreter.test.d.ts +0 -1
- package/dist/__tests__/snapshots/lexer/lexer.test.d.ts +0 -1
- package/dist/__tests__/snapshots/nan/nan.test.d.ts +0 -1
- package/dist/__tests__/snapshots/parser/parser.test.d.ts +0 -1
- package/dist/__tests__/snapshots/validator/validator.test.d.ts +0 -1
- package/dist/__tests__/utils/arbitraries/grammars.d.ts +0 -100
- package/dist/__tests__/utils/arbitraries/index.d.ts +0 -3
- package/dist/__tests__/utils/arbitraries/tokens.d.ts +0 -20
- package/dist/__tests__/utils/arbitraries/utils.d.ts +0 -59
- package/dist/__tests__/utils/compiler.d.ts +0 -13
- package/dist/__tests__/utils/index.d.ts +0 -3
- package/dist/__tests__/utils/mocks.d.ts +0 -17
- package/dist/__tests__/utils/testHelpers.d.ts +0 -16
- package/dist/src/core/analyzer/symbol/symbols.d.ts +0 -132
- package/dist/src/core/option.d.ts +0 -18
- package/dist/src/core/report.d.ts +0 -12
- package/dist/src/core/utils.d.ts +0 -13
- /package/dist/src/core/{types.d.ts → types/position.d.ts} +0 -0
- /package/dist/src/core/{analyzer → types}/symbol/symbolTable.d.ts +0 -0
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { SyntaxToken, SyntaxTokenKind } from '../lexer/tokens';
|
|
2
|
-
import { Option } from '../option';
|
|
3
1
|
import { default as NodeFactory } from './factory';
|
|
4
|
-
import { CommaExpressionNode, ElementDeclarationNode, ExpressionNode, IdentiferStreamNode, InfixExpressionNode, LiteralNode, NormalExpressionNode, PrimaryExpressionNode, SyntaxNode, VariableNode } from '
|
|
5
|
-
|
|
2
|
+
import { CommaExpressionNode, ElementDeclarationNode, ExpressionNode, IdentiferStreamNode, InfixExpressionNode, LiteralNode, NormalExpressionNode, PrimaryExpressionNode, SyntaxNode, VariableNode } from '../types/nodes';
|
|
3
|
+
import { SyntaxToken, SyntaxTokenKind } from '../types/tokens';
|
|
4
|
+
export declare function convertFuncAppToElem(_callee: ExpressionNode | CommaExpressionNode | undefined, _args: (NormalExpressionNode | CommaExpressionNode)[], factory: NodeFactory): ElementDeclarationNode | undefined;
|
|
6
5
|
export declare function isAsKeyword(token?: SyntaxToken): token is SyntaxToken & {
|
|
7
6
|
kind: SyntaxTokenKind.IDENTIFIER;
|
|
8
7
|
value: 'as';
|
|
@@ -10,7 +9,7 @@ export declare function isAsKeyword(token?: SyntaxToken): token is SyntaxToken &
|
|
|
10
9
|
export declare function markInvalid(nodeOrToken?: SyntaxNode | SyntaxToken): void;
|
|
11
10
|
export declare function isInvalidToken(token?: SyntaxToken): boolean;
|
|
12
11
|
export declare function getMemberChain(node: SyntaxNode): Readonly<(SyntaxNode | SyntaxToken)[]>;
|
|
13
|
-
export declare function extractVariableNode(value?: unknown):
|
|
12
|
+
export declare function extractVariableNode(value?: unknown): SyntaxToken | undefined;
|
|
14
13
|
export declare function isExpressionAQuotedString(value?: unknown): value is PrimaryExpressionNode & ({
|
|
15
14
|
expression: VariableNode & {
|
|
16
15
|
variable: SyntaxToken & {
|
|
@@ -49,6 +48,6 @@ type DotDelimitedIdentifier = PrimaryExpressionNode | (AccessExpression & {
|
|
|
49
48
|
});
|
|
50
49
|
export declare function isAccessExpression(node?: SyntaxNode): node is AccessExpression;
|
|
51
50
|
export declare function isDotDelimitedIdentifier(node?: SyntaxNode): node is DotDelimitedIdentifier;
|
|
52
|
-
export declare function extractStringFromIdentifierStream(stream?: IdentiferStreamNode):
|
|
53
|
-
export declare function getElementNameString(element?: ElementDeclarationNode):
|
|
51
|
+
export declare function extractStringFromIdentifierStream(stream?: IdentiferStreamNode): string | undefined;
|
|
52
|
+
export declare function getElementNameString(element?: ElementDeclarationNode): string | undefined;
|
|
54
53
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { SyntaxNode } from './nodes';
|
|
2
|
+
import { SyntaxToken } from './tokens';
|
|
3
|
+
import { Filepath } from './filepath';
|
|
3
4
|
export declare enum CompileErrorCode {
|
|
4
5
|
UNKNOWN_SYMBOL = 1000,
|
|
5
6
|
UNEXPECTED_SYMBOL = 1001,
|
|
@@ -115,6 +116,7 @@ export declare class CompileError extends Error {
|
|
|
115
116
|
end: Readonly<number>;
|
|
116
117
|
constructor(code: number, message: string, nodeOrToken: SyntaxNode | SyntaxToken);
|
|
117
118
|
toWarning(): CompileWarning;
|
|
119
|
+
get filepath(): Filepath;
|
|
118
120
|
}
|
|
119
121
|
export declare class CompileWarning extends Error {
|
|
120
122
|
code: Readonly<CompileErrorCode>;
|
|
@@ -123,4 +125,5 @@ export declare class CompileWarning extends Error {
|
|
|
123
125
|
start: Readonly<number>;
|
|
124
126
|
end: Readonly<number>;
|
|
125
127
|
constructor(code: number, message: string, nodeOrToken: SyntaxNode | SyntaxToken);
|
|
128
|
+
get filepath(): Filepath;
|
|
126
129
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Internable } from './internable';
|
|
2
|
+
declare const __filepathIdBrand: unique symbol;
|
|
3
|
+
export type FilepathId = string & {
|
|
4
|
+
[__filepathIdBrand]: true;
|
|
5
|
+
};
|
|
6
|
+
export declare class Filepath implements Internable<FilepathId> {
|
|
7
|
+
private readonly path;
|
|
8
|
+
constructor(absolutePath: string);
|
|
9
|
+
intern(): FilepathId;
|
|
10
|
+
static from(absolutePath: string): Filepath;
|
|
11
|
+
static resolve(fromDir: string, relativePath: string): Filepath;
|
|
12
|
+
static fromUri(uri: string): Filepath;
|
|
13
|
+
get absolute(): string;
|
|
14
|
+
get dirname(): string;
|
|
15
|
+
get basename(): string;
|
|
16
|
+
get extname(): string;
|
|
17
|
+
resolve(relativePath: string): Filepath;
|
|
18
|
+
join(...segments: string[]): Filepath;
|
|
19
|
+
relativeTo(baseDir: string): string;
|
|
20
|
+
toString(): string;
|
|
21
|
+
equals(other: Filepath): boolean;
|
|
22
|
+
toUri(): string;
|
|
23
|
+
static isRelative(p: string): boolean;
|
|
24
|
+
}
|
|
25
|
+
export declare function resolveImportFilepath(currentFilepath: Filepath, relativePath: string): Filepath | undefined;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface Internable<Id extends Primitive> {
|
|
2
|
+
intern(): Id;
|
|
3
|
+
}
|
|
4
|
+
export type Primitive = string | number | boolean | symbol | bigint | null | undefined;
|
|
5
|
+
export declare function intern<T extends Primitive, Id extends Primitive>(value: Internable<Id> | T | T[]): Id | T | string;
|
|
6
|
+
export declare function intern<Id extends Primitive>(value: Internable<Id>): Id;
|
|
7
|
+
export declare function intern<T extends Primitive>(value: T): T;
|
|
8
|
+
export declare function intern<T extends Primitive>(value: T[]): string;
|
|
9
|
+
export declare class InternedMap<K extends Internable<P>, V, P extends Primitive = ReturnType<K['intern']>> {
|
|
10
|
+
private readonly map;
|
|
11
|
+
constructor();
|
|
12
|
+
get(key: K): V | undefined;
|
|
13
|
+
set(key: K, value: V): this;
|
|
14
|
+
has(key: K): boolean;
|
|
15
|
+
delete(key: K): boolean;
|
|
16
|
+
get size(): number;
|
|
17
|
+
entries(): IterableIterator<[P, V]>;
|
|
18
|
+
[Symbol.iterator](): IterableIterator<[P, V]>;
|
|
19
|
+
merge(other: InternedMap<K, V, P>): this;
|
|
20
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as Compiler } from '../../compiler';
|
|
2
|
+
import { default as Report } from './report';
|
|
3
|
+
export declare const PASS_THROUGH: unique symbol;
|
|
4
|
+
export type PassThrough = typeof PASS_THROUGH;
|
|
5
|
+
export declare const UNHANDLED: unique symbol;
|
|
6
|
+
export type Unhandled = typeof UNHANDLED;
|
|
7
|
+
export interface Module {
|
|
8
|
+
[index: string]: undefined | ((compiler: Compiler, ...args: any[]) => Report<unknown> | Report<PassThrough>);
|
|
9
|
+
}
|
|
@@ -1,24 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { ElementKind } from '../analyzer/types';
|
|
2
|
+
import { Position } from '.';
|
|
3
|
+
import { Filepath } from './filepath';
|
|
4
|
+
import { Internable } from './internable';
|
|
5
|
+
import { NodeSymbol } from './symbol/symbols';
|
|
6
|
+
import { SyntaxToken } from './tokens';
|
|
4
7
|
export type SyntaxNodeId = number;
|
|
8
|
+
export type InternedSyntaxNode = string;
|
|
5
9
|
export declare class SyntaxNodeIdGenerator {
|
|
6
10
|
private id;
|
|
7
11
|
reset(): void;
|
|
8
12
|
nextId(): SyntaxNodeId;
|
|
9
13
|
}
|
|
10
|
-
export declare class SyntaxNode {
|
|
14
|
+
export declare class SyntaxNode implements Internable<InternedSyntaxNode> {
|
|
11
15
|
id: Readonly<SyntaxNodeId>;
|
|
12
16
|
kind: SyntaxNodeKind;
|
|
17
|
+
readonly filepath: Filepath;
|
|
13
18
|
startPos: Readonly<Position>;
|
|
14
19
|
start: Readonly<number>;
|
|
15
20
|
fullStart: Readonly<number>;
|
|
16
21
|
endPos: Readonly<Position>;
|
|
17
22
|
end: Readonly<number>;
|
|
18
23
|
fullEnd: Readonly<number>;
|
|
24
|
+
parentNode?: SyntaxNode;
|
|
19
25
|
symbol?: NodeSymbol;
|
|
20
26
|
referee?: NodeSymbol;
|
|
21
|
-
constructor(id: SyntaxNodeId, kind: SyntaxNodeKind, args: Readonly<SyntaxToken | SyntaxNode | undefined>[]);
|
|
27
|
+
constructor(id: SyntaxNodeId, kind: SyntaxNodeKind, filepath: Filepath, args: Readonly<SyntaxToken | SyntaxNode | undefined>[]);
|
|
28
|
+
intern(): InternedSyntaxNode;
|
|
29
|
+
parentOfKind<T extends SyntaxNode>(cls: (new (...args: any[]) => T)): T | undefined;
|
|
30
|
+
strictlyContains(otherNode: SyntaxNode): boolean;
|
|
31
|
+
containsEq(otherNode: SyntaxNode): boolean;
|
|
22
32
|
}
|
|
23
33
|
export declare enum SyntaxNodeKind {
|
|
24
34
|
PROGRAM = "<program>",
|
|
@@ -47,11 +57,11 @@ export declare class ProgramNode extends SyntaxNode {
|
|
|
47
57
|
body: ElementDeclarationNode[];
|
|
48
58
|
eof?: SyntaxToken;
|
|
49
59
|
source: string;
|
|
50
|
-
constructor({ body, eof, source }: {
|
|
60
|
+
constructor({ body, eof, source, }: {
|
|
51
61
|
body?: ElementDeclarationNode[];
|
|
52
62
|
eof?: SyntaxToken;
|
|
53
63
|
source: string;
|
|
54
|
-
}, id: SyntaxNodeId);
|
|
64
|
+
}, id: SyntaxNodeId, filepath: Filepath);
|
|
55
65
|
}
|
|
56
66
|
export declare class ElementDeclarationNode extends SyntaxNode {
|
|
57
67
|
type?: SyntaxToken;
|
|
@@ -70,13 +80,14 @@ export declare class ElementDeclarationNode extends SyntaxNode {
|
|
|
70
80
|
attributeList?: ListExpressionNode;
|
|
71
81
|
bodyColon?: SyntaxToken;
|
|
72
82
|
body?: BlockExpressionNode | FunctionApplicationNode;
|
|
73
|
-
}, id: SyntaxNodeId);
|
|
83
|
+
}, id: SyntaxNodeId, filepath: Filepath);
|
|
84
|
+
isKind(...kinds: ElementKind[]): boolean;
|
|
74
85
|
}
|
|
75
86
|
export declare class IdentiferStreamNode extends SyntaxNode {
|
|
76
87
|
identifiers: SyntaxToken[];
|
|
77
|
-
constructor({ identifiers }: {
|
|
88
|
+
constructor({ identifiers, }: {
|
|
78
89
|
identifiers?: SyntaxToken[];
|
|
79
|
-
}, id: SyntaxNodeId);
|
|
90
|
+
}, id: SyntaxNodeId, filepath: Filepath);
|
|
80
91
|
}
|
|
81
92
|
export declare class AttributeNode extends SyntaxNode {
|
|
82
93
|
name?: IdentiferStreamNode | PrimaryExpressionNode;
|
|
@@ -86,17 +97,17 @@ export declare class AttributeNode extends SyntaxNode {
|
|
|
86
97
|
name?: IdentiferStreamNode | PrimaryExpressionNode;
|
|
87
98
|
colon?: SyntaxToken;
|
|
88
99
|
value?: NormalExpressionNode | IdentiferStreamNode;
|
|
89
|
-
}, id: SyntaxNodeId);
|
|
100
|
+
}, id: SyntaxNodeId, filepath: Filepath);
|
|
90
101
|
}
|
|
91
102
|
export type NormalExpressionNode = PrefixExpressionNode | InfixExpressionNode | PostfixExpressionNode | BlockExpressionNode | ListExpressionNode | TupleExpressionNode | CommaExpressionNode | CallExpressionNode | PrimaryExpressionNode | FunctionExpressionNode | EmptyNode | ArrayNode;
|
|
92
103
|
export type ExpressionNode = ElementDeclarationNode | NormalExpressionNode | FunctionApplicationNode;
|
|
93
104
|
export declare class PrefixExpressionNode extends SyntaxNode {
|
|
94
105
|
op?: SyntaxToken;
|
|
95
106
|
expression?: NormalExpressionNode;
|
|
96
|
-
constructor({ op, expression }: {
|
|
107
|
+
constructor({ op, expression, }: {
|
|
97
108
|
op?: SyntaxToken;
|
|
98
109
|
expression?: NormalExpressionNode;
|
|
99
|
-
}, id: SyntaxNodeId);
|
|
110
|
+
}, id: SyntaxNodeId, filepath: Filepath);
|
|
100
111
|
}
|
|
101
112
|
export declare class InfixExpressionNode extends SyntaxNode {
|
|
102
113
|
op?: SyntaxToken;
|
|
@@ -106,29 +117,29 @@ export declare class InfixExpressionNode extends SyntaxNode {
|
|
|
106
117
|
op?: SyntaxToken;
|
|
107
118
|
leftExpression?: NormalExpressionNode;
|
|
108
119
|
rightExpression?: NormalExpressionNode;
|
|
109
|
-
}, id: SyntaxNodeId);
|
|
120
|
+
}, id: SyntaxNodeId, filepath: Filepath);
|
|
110
121
|
}
|
|
111
122
|
export declare class PostfixExpressionNode extends SyntaxNode {
|
|
112
123
|
op?: SyntaxToken;
|
|
113
124
|
expression?: NormalExpressionNode;
|
|
114
|
-
constructor({ op, expression }: {
|
|
125
|
+
constructor({ op, expression, }: {
|
|
115
126
|
op?: SyntaxToken;
|
|
116
127
|
expression?: NormalExpressionNode;
|
|
117
|
-
}, id: SyntaxNodeId);
|
|
128
|
+
}, id: SyntaxNodeId, filepath: Filepath);
|
|
118
129
|
}
|
|
119
130
|
export declare class FunctionExpressionNode extends SyntaxNode {
|
|
120
131
|
value?: SyntaxToken;
|
|
121
|
-
constructor({ value }: {
|
|
132
|
+
constructor({ value, }: {
|
|
122
133
|
value?: SyntaxToken;
|
|
123
|
-
}, id: SyntaxNodeId);
|
|
134
|
+
}, id: SyntaxNodeId, filepath: Filepath);
|
|
124
135
|
}
|
|
125
136
|
export declare class FunctionApplicationNode extends SyntaxNode {
|
|
126
137
|
callee?: ExpressionNode;
|
|
127
138
|
args: ExpressionNode[];
|
|
128
|
-
constructor({ callee, args }: {
|
|
139
|
+
constructor({ callee, args, }: {
|
|
129
140
|
callee?: ExpressionNode;
|
|
130
141
|
args?: ExpressionNode[];
|
|
131
|
-
}, id: SyntaxNodeId);
|
|
142
|
+
}, id: SyntaxNodeId, filepath: Filepath);
|
|
132
143
|
}
|
|
133
144
|
export declare class BlockExpressionNode extends SyntaxNode {
|
|
134
145
|
blockOpenBrace?: SyntaxToken;
|
|
@@ -138,7 +149,7 @@ export declare class BlockExpressionNode extends SyntaxNode {
|
|
|
138
149
|
blockOpenBrace?: SyntaxToken;
|
|
139
150
|
body?: (ElementDeclarationNode | FunctionApplicationNode)[];
|
|
140
151
|
blockCloseBrace?: SyntaxToken;
|
|
141
|
-
}, id: SyntaxNodeId);
|
|
152
|
+
}, id: SyntaxNodeId, filepath: Filepath);
|
|
142
153
|
}
|
|
143
154
|
export declare class ListExpressionNode extends SyntaxNode {
|
|
144
155
|
listOpenBracket?: SyntaxToken;
|
|
@@ -150,7 +161,7 @@ export declare class ListExpressionNode extends SyntaxNode {
|
|
|
150
161
|
elementList?: AttributeNode[];
|
|
151
162
|
commaList?: SyntaxToken[];
|
|
152
163
|
listCloseBracket?: SyntaxToken;
|
|
153
|
-
}, id: SyntaxNodeId);
|
|
164
|
+
}, id: SyntaxNodeId, filepath: Filepath);
|
|
154
165
|
}
|
|
155
166
|
export declare class TupleExpressionNode extends SyntaxNode {
|
|
156
167
|
tupleOpenParen?: SyntaxToken;
|
|
@@ -162,7 +173,7 @@ export declare class TupleExpressionNode extends SyntaxNode {
|
|
|
162
173
|
elementList?: NormalExpressionNode[];
|
|
163
174
|
commaList?: SyntaxToken[];
|
|
164
175
|
tupleCloseParen?: SyntaxToken;
|
|
165
|
-
}, id: SyntaxNodeId);
|
|
176
|
+
}, id: SyntaxNodeId, filepath: Filepath);
|
|
166
177
|
}
|
|
167
178
|
export declare class CommaExpressionNode extends SyntaxNode {
|
|
168
179
|
elementList: NormalExpressionNode[];
|
|
@@ -170,14 +181,14 @@ export declare class CommaExpressionNode extends SyntaxNode {
|
|
|
170
181
|
constructor({ elementList, commaList, }: {
|
|
171
182
|
elementList?: NormalExpressionNode[];
|
|
172
183
|
commaList?: SyntaxToken[];
|
|
173
|
-
}, id: SyntaxNodeId);
|
|
184
|
+
}, id: SyntaxNodeId, filepath: Filepath);
|
|
174
185
|
}
|
|
175
186
|
export declare class GroupExpressionNode extends TupleExpressionNode {
|
|
176
187
|
constructor({ groupOpenParen, expression, groupCloseParen, }: {
|
|
177
188
|
groupOpenParen?: SyntaxToken;
|
|
178
189
|
expression?: NormalExpressionNode;
|
|
179
190
|
groupCloseParen?: SyntaxToken;
|
|
180
|
-
}, id: SyntaxNodeId);
|
|
191
|
+
}, id: SyntaxNodeId, filepath: Filepath);
|
|
181
192
|
}
|
|
182
193
|
export declare class CallExpressionNode extends SyntaxNode {
|
|
183
194
|
callee?: NormalExpressionNode;
|
|
@@ -185,42 +196,42 @@ export declare class CallExpressionNode extends SyntaxNode {
|
|
|
185
196
|
constructor({ callee, argumentList, }: {
|
|
186
197
|
callee?: NormalExpressionNode;
|
|
187
198
|
argumentList?: TupleExpressionNode;
|
|
188
|
-
}, id: SyntaxNodeId);
|
|
199
|
+
}, id: SyntaxNodeId, filepath: Filepath);
|
|
189
200
|
}
|
|
190
201
|
export declare class LiteralNode extends SyntaxNode {
|
|
191
202
|
literal?: SyntaxToken;
|
|
192
|
-
constructor({ literal }: {
|
|
203
|
+
constructor({ literal, }: {
|
|
193
204
|
literal?: SyntaxToken;
|
|
194
|
-
}, id: SyntaxNodeId);
|
|
205
|
+
}, id: SyntaxNodeId, filepath: Filepath);
|
|
195
206
|
}
|
|
196
207
|
export declare class WildcardNode extends SyntaxNode {
|
|
197
208
|
token?: SyntaxToken;
|
|
198
|
-
constructor({ token }: {
|
|
209
|
+
constructor({ token, }: {
|
|
199
210
|
token?: SyntaxToken;
|
|
200
|
-
}, id: SyntaxNodeId);
|
|
211
|
+
}, id: SyntaxNodeId, filepath: Filepath);
|
|
201
212
|
}
|
|
202
213
|
export declare class VariableNode extends SyntaxNode {
|
|
203
214
|
variable?: SyntaxToken;
|
|
204
|
-
constructor({ variable }: {
|
|
215
|
+
constructor({ variable, }: {
|
|
205
216
|
variable?: SyntaxToken;
|
|
206
|
-
}, id: SyntaxNodeId);
|
|
217
|
+
}, id: SyntaxNodeId, filepath: Filepath);
|
|
207
218
|
}
|
|
208
219
|
export declare class PrimaryExpressionNode extends SyntaxNode {
|
|
209
220
|
expression?: LiteralNode | VariableNode;
|
|
210
|
-
constructor({ expression }: {
|
|
221
|
+
constructor({ expression, }: {
|
|
211
222
|
expression?: LiteralNode | VariableNode;
|
|
212
|
-
}, id: SyntaxNodeId);
|
|
223
|
+
}, id: SyntaxNodeId, filepath: Filepath);
|
|
213
224
|
}
|
|
214
225
|
export declare class EmptyNode extends SyntaxNode {
|
|
215
|
-
constructor({ prevToken }: {
|
|
226
|
+
constructor({ prevToken, }: {
|
|
216
227
|
prevToken: Readonly<SyntaxNode> | Readonly<SyntaxToken>;
|
|
217
|
-
}, id: SyntaxNodeId);
|
|
228
|
+
}, id: SyntaxNodeId, filepath: Filepath);
|
|
218
229
|
}
|
|
219
230
|
export declare class ArrayNode extends SyntaxNode {
|
|
220
231
|
array?: NormalExpressionNode;
|
|
221
232
|
indexer?: ListExpressionNode;
|
|
222
|
-
constructor({ expression, indexer }: {
|
|
233
|
+
constructor({ expression, indexer, }: {
|
|
223
234
|
expression?: NormalExpressionNode;
|
|
224
235
|
indexer: ListExpressionNode;
|
|
225
|
-
}, id: SyntaxNodeId);
|
|
236
|
+
}, id: SyntaxNodeId, filepath: Filepath);
|
|
226
237
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CompileError, CompileWarning } from './errors';
|
|
2
|
+
export default class Report<T> {
|
|
3
|
+
private value;
|
|
4
|
+
private errors;
|
|
5
|
+
private warnings?;
|
|
6
|
+
static create<T>(value: T, errors?: CompileError[], warnings?: CompileWarning[]): Report<T>;
|
|
7
|
+
constructor(value: T, errors?: CompileError[], warnings?: CompileWarning[]);
|
|
8
|
+
filter<S extends symbol>(filteredValue: S): Report<undefined | Exclude<T, S>>;
|
|
9
|
+
hasValue<S>(value: S): this is Report<S>;
|
|
10
|
+
getFiltered<S extends symbol>(filteredValue: S): Exclude<T, typeof filteredValue> | undefined;
|
|
11
|
+
getValue(): T;
|
|
12
|
+
getErrors(): CompileError[];
|
|
13
|
+
getWarnings(): CompileWarning[];
|
|
14
|
+
chainFiltered<S extends symbol, U>(filteredValue: S, fn: (_: Exclude<T, S>) => Report<U>): Report<U | undefined>;
|
|
15
|
+
chain<U>(fn: (_: T) => Report<U>): Report<U>;
|
|
16
|
+
mapFiltered<S extends symbol, U>(filteredValue: S, fn: (_: T) => U): Report<U | undefined>;
|
|
17
|
+
map<U>(fn: (_: T) => U): Report<U>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import { Filepath } from './filepath';
|
|
2
|
+
import { Position } from './position';
|
|
3
|
+
export interface TokenPosition {
|
|
4
|
+
start: Position;
|
|
5
|
+
end: Position;
|
|
6
|
+
filepath: Filepath;
|
|
7
|
+
}
|
|
8
|
+
export interface ElementRef {
|
|
9
|
+
name: string;
|
|
10
|
+
schemaName: string | null;
|
|
11
|
+
visibleNames: {
|
|
12
|
+
schemaName: string | null;
|
|
13
|
+
name: string;
|
|
14
|
+
}[];
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* FilterConfig is a tri-state filter:
|
|
18
|
+
* - [] (empty array) = show all
|
|
19
|
+
* - [...] (array with items) = show only these specific items
|
|
20
|
+
* - null = hide all
|
|
21
|
+
*/
|
|
22
|
+
export interface FilterConfig {
|
|
23
|
+
tables: Array<{
|
|
24
|
+
name: string;
|
|
25
|
+
schemaName: string;
|
|
26
|
+
}> | null;
|
|
27
|
+
stickyNotes: Array<{
|
|
28
|
+
name: string;
|
|
29
|
+
}> | null;
|
|
30
|
+
tableGroups: Array<{
|
|
31
|
+
name: string;
|
|
32
|
+
}> | null;
|
|
33
|
+
schemas: Array<{
|
|
34
|
+
name: string;
|
|
35
|
+
}> | null;
|
|
36
|
+
}
|
|
37
|
+
export interface DiagramView {
|
|
38
|
+
name: string;
|
|
39
|
+
schemaName: string | null;
|
|
40
|
+
visibleEntities: FilterConfig;
|
|
41
|
+
token: TokenPosition;
|
|
42
|
+
}
|
|
43
|
+
export interface Database {
|
|
44
|
+
schemas: [];
|
|
45
|
+
tables: Table[];
|
|
46
|
+
notes: Note[];
|
|
47
|
+
refs: Ref[];
|
|
48
|
+
enums: Enum[];
|
|
49
|
+
tableGroups: TableGroup[];
|
|
50
|
+
aliases: Alias[];
|
|
51
|
+
project?: Project;
|
|
52
|
+
tablePartials: TablePartial[];
|
|
53
|
+
records: TableRecord[];
|
|
54
|
+
diagramViews: DiagramView[];
|
|
55
|
+
token?: TokenPosition;
|
|
56
|
+
}
|
|
57
|
+
export interface MasterDatabase {
|
|
58
|
+
files: Record<string, Database>;
|
|
59
|
+
items: Database;
|
|
60
|
+
}
|
|
61
|
+
export interface Table {
|
|
62
|
+
name: string;
|
|
63
|
+
schemaName: string | null;
|
|
64
|
+
alias: string | null;
|
|
65
|
+
fields: Column[];
|
|
66
|
+
checks: Check[];
|
|
67
|
+
partials: TablePartialInjection[];
|
|
68
|
+
token: TokenPosition;
|
|
69
|
+
indexes: Index[];
|
|
70
|
+
headerColor?: string;
|
|
71
|
+
note?: {
|
|
72
|
+
value: string;
|
|
73
|
+
token: TokenPosition;
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
export interface Note {
|
|
77
|
+
name: string;
|
|
78
|
+
content: string;
|
|
79
|
+
token: TokenPosition;
|
|
80
|
+
headerColor?: string;
|
|
81
|
+
}
|
|
82
|
+
export interface ColumnType {
|
|
83
|
+
schemaName: string | null;
|
|
84
|
+
type_name: string;
|
|
85
|
+
args: string | null;
|
|
86
|
+
numericParams?: {
|
|
87
|
+
precision: number;
|
|
88
|
+
scale: number;
|
|
89
|
+
};
|
|
90
|
+
lengthParam?: {
|
|
91
|
+
length: number;
|
|
92
|
+
};
|
|
93
|
+
isEnum?: boolean;
|
|
94
|
+
}
|
|
95
|
+
export interface Column {
|
|
96
|
+
name: string;
|
|
97
|
+
type: ColumnType;
|
|
98
|
+
token: TokenPosition;
|
|
99
|
+
inline_refs: InlineRef[];
|
|
100
|
+
checks: Check[];
|
|
101
|
+
pk?: boolean;
|
|
102
|
+
dbdefault?: {
|
|
103
|
+
type: 'number' | 'string' | 'boolean' | 'expression';
|
|
104
|
+
value: number | string;
|
|
105
|
+
};
|
|
106
|
+
increment?: boolean;
|
|
107
|
+
unique?: boolean;
|
|
108
|
+
not_null?: boolean;
|
|
109
|
+
note?: {
|
|
110
|
+
value: string;
|
|
111
|
+
token: TokenPosition;
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
export interface Index {
|
|
115
|
+
columns: {
|
|
116
|
+
value: string;
|
|
117
|
+
type: string;
|
|
118
|
+
token: TokenPosition;
|
|
119
|
+
}[];
|
|
120
|
+
token: TokenPosition;
|
|
121
|
+
unique?: boolean;
|
|
122
|
+
pk?: boolean;
|
|
123
|
+
name?: string;
|
|
124
|
+
note?: {
|
|
125
|
+
value: string;
|
|
126
|
+
token: TokenPosition;
|
|
127
|
+
};
|
|
128
|
+
type?: string;
|
|
129
|
+
}
|
|
130
|
+
export interface Check {
|
|
131
|
+
token: TokenPosition;
|
|
132
|
+
expression: string;
|
|
133
|
+
name?: string;
|
|
134
|
+
}
|
|
135
|
+
export interface InlineRef {
|
|
136
|
+
schemaName: string | null;
|
|
137
|
+
tableName: string;
|
|
138
|
+
fieldNames: string[];
|
|
139
|
+
relation: '>' | '<' | '-' | '<>';
|
|
140
|
+
token: TokenPosition;
|
|
141
|
+
}
|
|
142
|
+
export interface Ref {
|
|
143
|
+
schemaName: string | null;
|
|
144
|
+
name: string | null;
|
|
145
|
+
endpoints: RefEndpointPair;
|
|
146
|
+
color?: string;
|
|
147
|
+
onDelete?: string;
|
|
148
|
+
onUpdate?: string;
|
|
149
|
+
token: TokenPosition;
|
|
150
|
+
}
|
|
151
|
+
export type RefEndpointPair = [RefEndpoint, RefEndpoint];
|
|
152
|
+
export interface RefEndpoint {
|
|
153
|
+
schemaName: string | null;
|
|
154
|
+
tableName: string;
|
|
155
|
+
fieldNames: string[];
|
|
156
|
+
relation: RelationCardinality;
|
|
157
|
+
token: TokenPosition;
|
|
158
|
+
}
|
|
159
|
+
export type RelationCardinality = '1' | '*';
|
|
160
|
+
export interface Enum {
|
|
161
|
+
name: string;
|
|
162
|
+
schemaName: string | null;
|
|
163
|
+
token: TokenPosition;
|
|
164
|
+
values: EnumField[];
|
|
165
|
+
}
|
|
166
|
+
export interface EnumField {
|
|
167
|
+
name: string;
|
|
168
|
+
token: TokenPosition;
|
|
169
|
+
note?: {
|
|
170
|
+
value: string;
|
|
171
|
+
token: TokenPosition;
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
export interface TableGroup {
|
|
175
|
+
name: string | null;
|
|
176
|
+
schemaName: string | null;
|
|
177
|
+
tables: TableGroupField[];
|
|
178
|
+
token: TokenPosition;
|
|
179
|
+
color?: string;
|
|
180
|
+
note?: {
|
|
181
|
+
value: string;
|
|
182
|
+
token: TokenPosition;
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
export interface TableGroupField {
|
|
186
|
+
name: string;
|
|
187
|
+
schemaName: string | null;
|
|
188
|
+
}
|
|
189
|
+
export type AliasKind = 'table' | 'enum' | 'tablegroup' | 'tablepartial' | 'note';
|
|
190
|
+
export interface Alias {
|
|
191
|
+
name: string;
|
|
192
|
+
kind: AliasKind;
|
|
193
|
+
value: {
|
|
194
|
+
elementName: string;
|
|
195
|
+
/** @deprecated Use elementName instead */
|
|
196
|
+
tableName: string;
|
|
197
|
+
schemaName: string | null;
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
export interface TablePartial {
|
|
201
|
+
name: string;
|
|
202
|
+
fields: Column[];
|
|
203
|
+
token: TokenPosition;
|
|
204
|
+
indexes: Index[];
|
|
205
|
+
checks: Check[];
|
|
206
|
+
headerColor?: string;
|
|
207
|
+
note?: {
|
|
208
|
+
value: string;
|
|
209
|
+
token: TokenPosition;
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
export interface TablePartialInjection {
|
|
213
|
+
name: string;
|
|
214
|
+
order: number;
|
|
215
|
+
token: TokenPosition;
|
|
216
|
+
}
|
|
217
|
+
export type RecordValueType = 'string' | 'bool' | 'integer' | 'real' | 'date' | 'time' | 'datetime' | string;
|
|
218
|
+
export interface RecordValue {
|
|
219
|
+
value: any;
|
|
220
|
+
type: RecordValueType;
|
|
221
|
+
}
|
|
222
|
+
export interface TableRecord {
|
|
223
|
+
schemaName: string | undefined;
|
|
224
|
+
tableName: string;
|
|
225
|
+
columns: string[];
|
|
226
|
+
values: RecordValue[][];
|
|
227
|
+
token: TokenPosition;
|
|
228
|
+
}
|
|
229
|
+
export type Project = Record<string, never> | {
|
|
230
|
+
name: string | null;
|
|
231
|
+
tables: Table[];
|
|
232
|
+
refs: Ref[];
|
|
233
|
+
enums: Enum[];
|
|
234
|
+
tableGroups: TableGroup[];
|
|
235
|
+
tablePartials: TablePartial[];
|
|
236
|
+
note?: {
|
|
237
|
+
value: string;
|
|
238
|
+
token: TokenPosition;
|
|
239
|
+
};
|
|
240
|
+
token: TokenPosition;
|
|
241
|
+
[index: string & Omit<any, 'name' | 'tables' | 'refs' | 'enums' | 'tableGroups' | 'note' | 'tablePartials' | 'records'>]: string;
|
|
242
|
+
};
|
|
243
|
+
export type SchemaElement = Database | Project | Table | Note | Column | ColumnType | Index | Check | InlineRef | Ref | RefEndpoint | Enum | EnumField | TableGroup | TableGroupField | Alias | TablePartial | TablePartialInjection | TableRecord | RecordValue;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Option } from '../../option';
|
|
2
1
|
export type NodeSymbolIndex = string;
|
|
3
2
|
export declare enum SymbolKind {
|
|
4
3
|
Schema = "Schema",
|
|
@@ -8,7 +7,7 @@ export declare enum SymbolKind {
|
|
|
8
7
|
TableGroupField = "TableGroup field",
|
|
9
8
|
Enum = "Enum",
|
|
10
9
|
EnumField = "Enum field",
|
|
11
|
-
|
|
10
|
+
StickyNote = "Note",
|
|
12
11
|
TablePartial = "TablePartial",
|
|
13
12
|
PartialInjection = "PartialInjection",
|
|
14
13
|
DiagramView = "DiagramView",
|
|
@@ -27,8 +26,8 @@ export declare function createPartialInjectionSymbolIndex(key: string): NodeSymb
|
|
|
27
26
|
export declare function createDiagramViewSymbolIndex(key: string): NodeSymbolIndex;
|
|
28
27
|
export declare function createDiagramViewFieldSymbolIndex(key: string): NodeSymbolIndex;
|
|
29
28
|
export declare function createNodeSymbolIndex(key: string, symbolKind: SymbolKind): NodeSymbolIndex;
|
|
30
|
-
export declare function destructureIndex(id: NodeSymbolIndex):
|
|
29
|
+
export declare function destructureIndex(id: NodeSymbolIndex): {
|
|
31
30
|
name: string;
|
|
32
31
|
kind: SymbolKind;
|
|
33
|
-
}
|
|
32
|
+
} | undefined;
|
|
34
33
|
export declare function isPublicSchemaIndex(id: NodeSymbolIndex): boolean;
|