@artel/artc 0.6.25220 → 0.6.25222
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/build/Cli.js +3 -3
- package/build/api/Api.js +6 -4
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +394 -284
- package/build/{chunk-ASXPPFGP.js → chunk-MBMOAUK7.js} +3 -3
- package/build/{chunk-RHY36EE7.js → chunk-ODWG5ZXF.js} +4060 -2261
- package/build/{chunk-AUDD2JDS.js → chunk-UZK7JCND.js} +3 -3
- package/build/types/analysis/Analyzer.d.ts +53 -6
- package/build/types/analysis/ControlFlowGraphBuilder.d.ts +121 -0
- package/build/types/analysis/ControlFlowGraphVisualizer.d.ts +12 -0
- package/build/types/analysis/DiagnosticCollector.d.ts +3 -0
- package/build/types/analysis/NodeTypeUtils.d.ts +4 -1
- package/build/types/analysis/SemanticContext.d.ts +7 -0
- package/build/types/analysis/SemanticContextBuilder.d.ts +2 -0
- package/build/types/analysis/StatementBlockScopeBuilder.d.ts +19 -17
- package/build/types/analysis/TypeNarrower.d.ts +62 -0
- package/build/types/common/Range.d.ts +1 -0
- package/build/types/diagnostic/DiagnosticCode.d.ts +131 -123
- package/build/types/diagnostic/DiagnosticData.d.ts +2 -1
- package/build/types/emitter/IrBuilder.d.ts +3 -1
- package/build/types/emitter/IrToJs.d.ts +1 -0
- package/build/types/emitter/Transformer.d.ts +2 -0
- package/build/types/emitter/ir/Nodes.d.ts +86 -78
- package/build/types/emitter/ir/types.d.ts +2 -2
- package/build/types/parser/Scanner.d.ts +1 -0
- package/build/types/services/CompletionService.d.ts +2 -1
- package/build/types/services/DisplayService.d.ts +4 -2
- package/build/types/services/NodeSemanticInfo.d.ts +4 -2
- package/build/types/tree/KeywordKind.d.ts +41 -40
- package/build/types/tree/NodeKind.d.ts +63 -60
- package/build/types/tree/green/Nodes.d.ts +124 -86
- package/build/types/tree/green/SyntaxFactory.d.ts +12 -10
- package/build/types/tree/green/SyntaxToCode.d.ts +1 -0
- package/build/types/tree/green/Token.d.ts +1 -1
- package/build/types/tree/green/Utils.d.ts +1 -1
- package/build/types/tree/red/Nodes.d.ts +103 -63
- package/build/types/tree/red/Utils.d.ts +1 -1
- package/build/types/types/TypeFactory.d.ts +2 -1
- package/package.json +1 -1
@@ -1,125 +1,133 @@
|
|
1
1
|
export declare enum DiagnosticCode {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
2
|
+
UnterminatedToken = 0,
|
3
|
+
UnterminatedMultiLineComment = 1,
|
4
|
+
UnterminatedNumber = 2,
|
5
|
+
UnterminatedTextOrTextTemplate = 3,
|
6
|
+
UnterminatedQuotedIdentifier = 4,
|
7
|
+
IdentifierExpected = 5,
|
8
|
+
TypeNameExpected = 6,
|
9
|
+
PackageNameExpected = 7,
|
10
|
+
TypeMemberDeclarationExpected = 8,
|
11
|
+
SourceFileMemberExpected = 9,
|
12
|
+
EnumerationVariableDeclarationExpected = 10,
|
13
|
+
StatementExpected = 11,
|
14
|
+
ExpressionExpected = 12,
|
15
|
+
BaseTypeNameExpected = 13,
|
16
|
+
TypeSpecifierExpected = 14,
|
17
|
+
TypeBodyExpected = 15,
|
18
|
+
MethodCallArgumentExpected = 16,
|
19
|
+
IndexedAccessArgumentExpected = 17,
|
20
|
+
TagArgumentExpected = 18,
|
21
|
+
TypeParameterExpected = 19,
|
22
|
+
ParameterExpected = 20,
|
23
|
+
RunStatementClauseExpected = 21,
|
24
|
+
CatchClauseOrFinallyClauseExpected = 22,
|
25
|
+
PackageImportExpected = 23,
|
26
|
+
UsingDirectiveOrSourceFileMemberExpected = 24,
|
27
|
+
TypeMemberTranslationExpected = 25,
|
28
|
+
TranslationExpected = 26,
|
29
|
+
Expected0But1Found = 27,
|
30
|
+
InvalidTextTemplateLiteral = 28,
|
31
|
+
RunKeywordCreationKeywordOrModifierListExpected = 29,
|
32
|
+
ModifierListExpected = 30,
|
33
|
+
HidingLevelExpected = 31,
|
34
|
+
ParameterNameCanContainOnlyOneBackQuote = 32,
|
35
|
+
FieldNameCanContainOnlyTwoBackQuote = 33,
|
36
|
+
BackQuotesCanOnlyBeUsedInParameterAndFieldNames = 34,
|
37
|
+
NameThatMatchesKeywordMustBeEnclosedInSingleQuotes = 35,
|
38
|
+
TagNameExpected = 36,
|
39
|
+
TypeCannotBeUsedAsValue = 37,
|
40
|
+
PackageMemberNotFound = 38,
|
41
|
+
TypeMemberNotFound = 39,
|
42
|
+
CannotAccessStaticMembersOnTypeParameter = 40,
|
43
|
+
IndexerOfTheSpecifiedTypeNotFound = 41,
|
44
|
+
DereferenceOperatorOfTheSpecifiedTypeNotFound = 42,
|
45
|
+
IndexerNotFound = 43,
|
46
|
+
CannotCreateInstanceOfAspect = 44,
|
47
|
+
CannotCreateInstanceOfTypeParameter = 45,
|
48
|
+
CannotCreateInstanceOfUnresolvedType = 46,
|
49
|
+
TypeConstructorNotFound = 47,
|
50
|
+
CannotInvokeExpression = 48,
|
51
|
+
NamedArgumentExpectedButPositionalArgumentFound = 49,
|
52
|
+
ParameterWithGivenNameNotFound = 50,
|
53
|
+
ArgumentForParameterAlreadyPassed = 51,
|
54
|
+
PackageAliasCannotBeUsedAsValue = 52,
|
55
|
+
PackageNameCannotBeUsedAsValue = 53,
|
56
|
+
UnknownVariable = 54,
|
57
|
+
UnknownType = 55,
|
58
|
+
TypeWithArity0NotFound = 56,
|
59
|
+
VariableUsedBeforeBeingDeclared = 57,
|
60
|
+
Type0IsNotAssignableToType1 = 58,
|
61
|
+
VariableNotFound = 59,
|
62
|
+
MethodNotFound = 60,
|
63
|
+
UnknownPackage = 61,
|
64
|
+
CannotAssignValueToExpression = 62,
|
65
|
+
NotEveryRequiredParameterIsProvidedWithArgument = 63,
|
66
|
+
ParameterForPositionalArgumentNotFound = 64,
|
67
|
+
CannotDetermineTargetTypeToCallTheConstructor = 65,
|
68
|
+
AmbiguousAccess = 66,
|
69
|
+
PackageNameConflictsWithDeclarationName = 67,
|
70
|
+
CanNotAssignValueToContextVariable = 68,
|
71
|
+
ExpectedPackageNameOrAliasButFoundType = 69,
|
72
|
+
TypeExpected = 70,
|
73
|
+
NameOfTypeOrPackageNotFound = 71,
|
74
|
+
TypeIsNotATag = 72,
|
75
|
+
ExpressionOfType0CanNotBeUsedForEnumeration = 73,
|
76
|
+
Operator0IsNotDefinedForTypes1And2 = 74,
|
77
|
+
Operator0IsNotDefinedForType1 = 75,
|
78
|
+
VariantMustHaveAssociatedValue = 76,
|
79
|
+
PackageMemberOrPackageNotFound = 77,
|
80
|
+
TranslationsCanOnlyBeDeclaredInTranslationPackage = 78,
|
81
|
+
UnknownTranslatedPackage0 = 79,
|
82
|
+
BaseCannotBeUsedInThisContext = 80,
|
83
|
+
OverriddenMethodNotFound = 81,
|
84
|
+
ObjectCannotBeUsedInThisContext = 82,
|
85
|
+
BaseCannotBeUsedAsAnExpressionInItself = 83,
|
86
|
+
InterfacePackageMustNotContainImplementation = 84,
|
87
|
+
InterfacePackageVariablesMustNotHaveInitializers = 85,
|
88
|
+
BodyIsMissing = 86,
|
89
|
+
AbstractTypeMembersMustNotHaveBody = 87,
|
90
|
+
AbstractVariablesMustNotHaveInitializers = 88,
|
91
|
+
PackageIsAlreadyImportedInAnotherLanguage = 89,
|
92
|
+
OnlySubprogramsWithReturnTypeCanReturnValue = 90,
|
93
|
+
MethodsUsingYieldStatementCanNotReturnValue = 91,
|
94
|
+
YieldStatementCanNotBeUsedInAnonymousMethods = 92,
|
95
|
+
YieldStatementCanNotBeUsedHere = 93,
|
96
|
+
MethodsUsingYieldStatementMustHaveEnumerableAsReturnType = 94,
|
97
|
+
YieldStatementCanNotBeUsedInTryStatementThatHasCatchClause = 95,
|
98
|
+
YieldStatementCanNotBeUsedInFinallyClause = 96,
|
99
|
+
SubprogramMustReturnValue = 97,
|
100
|
+
ResultVariableCanNotBeUsedInMethodsUsingYieldStatement = 98,
|
101
|
+
TypeAliasReferencesItself = 99,
|
102
|
+
TypeParameterHasCircularConstraint = 100,
|
103
|
+
BaseTypeCausesInheritanceCycle = 101,
|
104
|
+
OnlyGenericTypesAndFunctionsCanBeSpecialized = 102,
|
105
|
+
Expected0TypeArguments = 103,
|
106
|
+
ExpectedFrom0To1TypeArguments = 104,
|
107
|
+
Type0IsNotAssignableToConstraint1 = 105,
|
108
|
+
VariableIsDeclaredButNotUsed = 106,
|
109
|
+
DefaultConstructorArgumentsMustBeNamed = 107,
|
110
|
+
IncorrectBodyOfRedefinableAliasTypeMethod = 108,
|
111
|
+
TheFollowingDeclarationsAreNotTranslated0 = 109,
|
112
|
+
TheFollowingDeclarationAreNotTranslated0And1More = 110,
|
113
|
+
OperatorMustNotBeStatic = 111,
|
114
|
+
Operator0MustNotHaveParameters = 112,
|
115
|
+
Operator0MustHaveOneParameter = 113,
|
116
|
+
Operator0MustHaveNoMoreThanOneParameter = 114,
|
117
|
+
CorrespondingRedefinableTypeMemberNotFound = 115,
|
118
|
+
ConstructorCanNotBeRedefinable = 116,
|
119
|
+
ConstructorCanNotBeRedefined = 117,
|
120
|
+
AsyncMethodCanOnlyBeCalledFromMethodMarkedWithAsyncModifier = 118,
|
121
|
+
TagNotFound = 119,
|
122
|
+
TypeOrMethodNameExpected = 120,
|
123
|
+
PackageNameOrAliasExpected = 121,
|
124
|
+
ExpressionCanBeNone = 122,
|
125
|
+
NoneAwareAccessCanNotBeUsedOnTheLeftHandSideOfAssignmentStatement = 123,
|
126
|
+
UnreachableCode = 124,
|
127
|
+
CanNotFindTsLibDirectoryBaseSearchPaths0 = 125,
|
128
|
+
SourceFile0IsNotPartOfThePackageAndWontBeLoaded = 126,
|
129
|
+
ProgramWithoutMainPackageCanNotBeCompiled = 127,
|
130
|
+
JsonConfigurationValidationError = 128,
|
131
|
+
StandardPackage0NotFound = 129,
|
132
|
+
Declaration0NotFoundInStandardPackage1 = 130
|
125
133
|
}
|
@@ -18,7 +18,8 @@ export declare class IrBuilder {
|
|
18
18
|
build(): ir.PackageMemberDeclaration[];
|
19
19
|
private buildPackageMemberDeclarationList;
|
20
20
|
private buildPackageConstructorDeclaration;
|
21
|
-
private
|
21
|
+
private buildFunctionBlockOfFunction;
|
22
|
+
private buildFunctionBlockOfFunctionWithoutResult;
|
22
23
|
private buildStatementBlock;
|
23
24
|
private buildStatement;
|
24
25
|
private buildAssignmentStatement;
|
@@ -55,6 +56,7 @@ export declare class IrBuilder {
|
|
55
56
|
private buildTryStatement;
|
56
57
|
private buildEmptyStatement;
|
57
58
|
private buildErrorStatement;
|
59
|
+
private buildImportantStatement;
|
58
60
|
private buildExpressionStatement;
|
59
61
|
private buildForStatement;
|
60
62
|
private buildIfStatement;
|
@@ -95,6 +95,7 @@ export declare class IrToJs {
|
|
95
95
|
private convertContinueLoopStatement;
|
96
96
|
private convertEmptyStatement;
|
97
97
|
private convertErrorStatement;
|
98
|
+
private convertImportantStatement;
|
98
99
|
private convertExpressionStatement;
|
99
100
|
private convertForStatement;
|
100
101
|
private convertIfStatement;
|
@@ -23,6 +23,7 @@ export declare class Transformer {
|
|
23
23
|
transformTryStatementChildren(statement: ir.TryStatement): void;
|
24
24
|
transformEmptyStatementChildren(_statement: ir.EmptyStatement): void;
|
25
25
|
transformErrorStatementChildren(statement: ir.ErrorStatement): void;
|
26
|
+
transformImportantStatementChildren(statement: ir.ImportantStatement): void;
|
26
27
|
transformExpressionStatementChildren(statement: ir.ExpressionStatement): void;
|
27
28
|
transformForStatementChildren(statement: ir.ForStatement): void;
|
28
29
|
transformIfStatementChildren(statement: ir.IfStatement): void;
|
@@ -168,6 +169,7 @@ export interface TransformationConfig {
|
|
168
169
|
transformTryStatement?(statement: ir.TryStatement): StatementTransformationResult;
|
169
170
|
transformEmptyStatement?(statement: ir.EmptyStatement): StatementTransformationResult;
|
170
171
|
transformErrorStatement?(statement: ir.ErrorStatement): StatementTransformationResult;
|
172
|
+
transformImportantStatement?(statement: ir.ImportantStatement): StatementTransformationResult;
|
171
173
|
transformExpressionStatement?(statement: ir.ExpressionStatement): StatementTransformationResult;
|
172
174
|
transformForStatement?(statement: ir.ForStatement): StatementTransformationResult;
|
173
175
|
transformIfStatement?(statement: ir.IfStatement): StatementTransformationResult;
|
@@ -211,6 +211,13 @@ export declare class ErrorStatement {
|
|
211
211
|
constructor(expression: Expression | undefined, sourceLocation: SourceLocation | undefined);
|
212
212
|
clone(): ErrorStatement;
|
213
213
|
}
|
214
|
+
export declare class ImportantStatement {
|
215
|
+
expression: Expression;
|
216
|
+
sourceLocation: SourceLocation | undefined;
|
217
|
+
readonly kind = NodeKind.ImportantStatement;
|
218
|
+
constructor(expression: Expression, sourceLocation: SourceLocation | undefined);
|
219
|
+
clone(): ImportantStatement;
|
220
|
+
}
|
214
221
|
export declare class ExpressionStatement {
|
215
222
|
expression: Expression;
|
216
223
|
sourceLocation: SourceLocation | undefined;
|
@@ -913,84 +920,85 @@ export declare const enum NodeKind {
|
|
913
920
|
NoneLiteral = 16,
|
914
921
|
EmptyStatement = 17,
|
915
922
|
ErrorStatement = 18,
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
|
955
|
-
|
956
|
-
|
957
|
-
|
958
|
-
|
959
|
-
|
960
|
-
|
961
|
-
|
962
|
-
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
|
984
|
-
|
985
|
-
|
986
|
-
|
987
|
-
|
988
|
-
|
989
|
-
|
990
|
-
|
991
|
-
|
992
|
-
|
993
|
-
|
923
|
+
ImportantStatement = 19,
|
924
|
+
ExpressionStatement = 20,
|
925
|
+
FinallyClause = 21,
|
926
|
+
ForStatement = 22,
|
927
|
+
PackageMethodDeclaration = 23,
|
928
|
+
PackageTypeDeclaration = 24,
|
929
|
+
PackageVariableDeclaration = 25,
|
930
|
+
PackageVariableGetterDeclaration = 26,
|
931
|
+
PackageVariableSetterDeclaration = 27,
|
932
|
+
PackageVariantTypeDeclaration = 28,
|
933
|
+
IfStatement = 29,
|
934
|
+
IndexedAccessExpression = 30,
|
935
|
+
IntegerLiteral = 31,
|
936
|
+
IsExpression = 32,
|
937
|
+
NestedMethodDeclaration = 33,
|
938
|
+
NestedMethodDeclarationStatement = 34,
|
939
|
+
LocalVariableDeclaration = 35,
|
940
|
+
LocalVariableDeclarationStatement = 36,
|
941
|
+
NumericLiteral = 37,
|
942
|
+
CatchClause = 38,
|
943
|
+
MethodLiteral = 39,
|
944
|
+
PrefixUnaryExpression = 40,
|
945
|
+
MeasureLiteral = 41,
|
946
|
+
ReferenceExpression = 42,
|
947
|
+
LoopStatement = 43,
|
948
|
+
ReturnStatement = 44,
|
949
|
+
Package = 45,
|
950
|
+
TextLiteral = 46,
|
951
|
+
TextTemplateLiteral = 47,
|
952
|
+
TypeConstructorDeclaration = 48,
|
953
|
+
TypeDestructorDeclaration = 49,
|
954
|
+
TypeIndexedGetterDeclaration = 50,
|
955
|
+
TypeIndexedSetterDeclaration = 51,
|
956
|
+
TypeMethodDeclaration = 52,
|
957
|
+
TypeVariableDeclaration = 53,
|
958
|
+
TypeVariableGetterDeclaration = 54,
|
959
|
+
TypeVariableSetterDeclaration = 55,
|
960
|
+
SwitchStatement = 56,
|
961
|
+
TernaryExpression = 57,
|
962
|
+
ThisExpression = 58,
|
963
|
+
ValueParameterDeclaration = 59,
|
964
|
+
VariantDeclaration = 60,
|
965
|
+
WhileStatement = 61,
|
966
|
+
YieldStatement = 62,
|
967
|
+
ArrayLiteral = 63,
|
968
|
+
TypeAccessExpression = 64,
|
969
|
+
VariableAccessExpression = 65,
|
970
|
+
MethodAccessExpression = 66,
|
971
|
+
ImplicitVariantAccessExpression = 67,
|
972
|
+
VariantAccessExpression = 68,
|
973
|
+
TypeVariableAccessExpression = 69,
|
974
|
+
TypeMethodAccessExpression = 70,
|
975
|
+
ConstructorCallExpression = 71,
|
976
|
+
InlineJsExpression = 72,
|
977
|
+
AssignmentExpression = 73,
|
978
|
+
CommaExpression = 74,
|
979
|
+
BaseConstructorCallExpression = 75,
|
980
|
+
JsImportSpecifier = 76,
|
981
|
+
JsIndexedAccessExpression = 77,
|
982
|
+
EsModuleImportDirectiveStatement = 78,
|
983
|
+
CjsModuleImportDirectiveStatement = 79,
|
984
|
+
JsObjectLiteral = 80,
|
985
|
+
NamedJsObjectLiteralProperty = 81,
|
986
|
+
SpreadJsObjectLiteralProperty = 82,
|
987
|
+
JsPropertyAccessExpression = 83,
|
988
|
+
JsFunctionLiteral = 84,
|
989
|
+
JsTypeOfExpression = 85,
|
990
|
+
JsInstanceOfExpression = 86,
|
991
|
+
JsIdentifierExpression = 87,
|
992
|
+
DereferenceExpression = 88,
|
993
|
+
BaseExpression = 89,
|
994
|
+
OwnConstructorCallExpression = 90,
|
995
|
+
TypeDereferencedVariableGetterDeclaration = 91,
|
996
|
+
TypeDereferencedVariableSetterDeclaration = 92,
|
997
|
+
JsNamespaceDestructuringStatement = 93,
|
998
|
+
ComputedTypeVariableDeclaration = 94,
|
999
|
+
TextWithEntityName = 95,
|
1000
|
+
Arguments = 96,
|
1001
|
+
Decorator = 97
|
994
1002
|
}
|
995
1003
|
export declare const enum AssignmentOperatorKind {
|
996
1004
|
Equals = 0,
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import * as ir from './Nodes.js';
|
2
|
-
export type Node = ir.ArrayLiteral | ir.AsExpression | ir.AssertionExpression | ir.AssumptionExpression | ir.AssignmentExpression | ir.AssignmentStatement | ir.BaseConstructorCallExpression | ir.BinaryExpression | ir.BlockStatement | ir.BooleanLiteral | ir.BreakLoopStatement | ir.CallExpression | ir.CharLiteral | ir.CommaExpression | ir.ConstructorCallExpression | ir.ContinueLoopStatement | ir.DisposeStatement | ir.RunStatement | ir.TryStatement | ir.NoneLiteral | ir.EmptyStatement | ir.ErrorStatement | ir.ExpressionStatement | ir.FinallyClause | ir.ForStatement | ir.PackageMethodDeclaration | ir.PackageTypeDeclaration | ir.PackageVariableDeclaration | ir.PackageVariableGetterDeclaration | ir.PackageVariableSetterDeclaration | ir.PackageVariantTypeDeclaration | ir.IfStatement | ir.IndexedAccessExpression | ir.InlineJsExpression | ir.TypeMethodAccessExpression | ir.TypeVariableAccessExpression | ir.IntegerLiteral | ir.IsExpression | ir.JsIndexedAccessExpression | ir.NestedMethodDeclaration | ir.NestedMethodDeclarationStatement | ir.LocalVariableDeclaration | ir.LocalVariableDeclarationStatement | ir.NumericLiteral | ir.CatchClause | ir.MethodAccessExpression | ir.MethodLiteral | ir.PrefixUnaryExpression | ir.MeasureLiteral | ir.ReferenceExpression | ir.LoopStatement | ir.Package | ir.ReturnStatement | ir.TextLiteral | ir.TextTemplateLiteral | ir.TypeConstructorDeclaration | ir.TypeDestructorDeclaration | ir.TypeIndexedGetterDeclaration | ir.TypeIndexedSetterDeclaration | ir.TypeMethodDeclaration | ir.TypeVariableDeclaration | ir.ComputedTypeVariableDeclaration | ir.TypeVariableGetterDeclaration | ir.TypeVariableSetterDeclaration | ir.SwitchStatement | ir.TernaryExpression | ir.ThisExpression | ir.TypeAccessExpression | ir.ValueParameterDeclaration | ir.VariableAccessExpression | ir.VariantDeclaration | ir.WhileStatement | ir.YieldStatement | ir.JsObjectLiteral | ir.NamedJsObjectLiteralProperty | ir.SpreadJsObjectLiteralProperty | ir.JsPropertyAccessExpression | ir.JsFunctionLiteral | ir.JsTypeOfExpression | ir.JsInstanceOfExpression | ir.JsIdentifierExpression | ir.DereferenceExpression | ir.BaseExpression | ir.OwnConstructorCallExpression | ir.EsModuleImportDirectiveStatement | ir.CjsModuleImportDirectiveStatement | ir.JsNamespaceDestructuringStatement | ir.TypeDereferencedVariableGetterDeclaration | ir.TypeDereferencedVariableSetterDeclaration | ir.TextWithEntityName | ir.Argument | ir.Arguments | ir.Decorator;
|
2
|
+
export type Node = ir.ArrayLiteral | ir.AsExpression | ir.AssertionExpression | ir.AssumptionExpression | ir.AssignmentExpression | ir.AssignmentStatement | ir.BaseConstructorCallExpression | ir.BinaryExpression | ir.BlockStatement | ir.BooleanLiteral | ir.BreakLoopStatement | ir.CallExpression | ir.CharLiteral | ir.CommaExpression | ir.ConstructorCallExpression | ir.ContinueLoopStatement | ir.DisposeStatement | ir.RunStatement | ir.TryStatement | ir.NoneLiteral | ir.EmptyStatement | ir.ErrorStatement | ir.ImportantStatement | ir.ExpressionStatement | ir.FinallyClause | ir.ForStatement | ir.PackageMethodDeclaration | ir.PackageTypeDeclaration | ir.PackageVariableDeclaration | ir.PackageVariableGetterDeclaration | ir.PackageVariableSetterDeclaration | ir.PackageVariantTypeDeclaration | ir.IfStatement | ir.IndexedAccessExpression | ir.InlineJsExpression | ir.TypeMethodAccessExpression | ir.TypeVariableAccessExpression | ir.IntegerLiteral | ir.IsExpression | ir.JsIndexedAccessExpression | ir.NestedMethodDeclaration | ir.NestedMethodDeclarationStatement | ir.LocalVariableDeclaration | ir.LocalVariableDeclarationStatement | ir.NumericLiteral | ir.CatchClause | ir.MethodAccessExpression | ir.MethodLiteral | ir.PrefixUnaryExpression | ir.MeasureLiteral | ir.ReferenceExpression | ir.LoopStatement | ir.Package | ir.ReturnStatement | ir.TextLiteral | ir.TextTemplateLiteral | ir.TypeConstructorDeclaration | ir.TypeDestructorDeclaration | ir.TypeIndexedGetterDeclaration | ir.TypeIndexedSetterDeclaration | ir.TypeMethodDeclaration | ir.TypeVariableDeclaration | ir.ComputedTypeVariableDeclaration | ir.TypeVariableGetterDeclaration | ir.TypeVariableSetterDeclaration | ir.SwitchStatement | ir.TernaryExpression | ir.ThisExpression | ir.TypeAccessExpression | ir.ValueParameterDeclaration | ir.VariableAccessExpression | ir.VariantDeclaration | ir.WhileStatement | ir.YieldStatement | ir.JsObjectLiteral | ir.NamedJsObjectLiteralProperty | ir.SpreadJsObjectLiteralProperty | ir.JsPropertyAccessExpression | ir.JsFunctionLiteral | ir.JsTypeOfExpression | ir.JsInstanceOfExpression | ir.JsIdentifierExpression | ir.DereferenceExpression | ir.BaseExpression | ir.OwnConstructorCallExpression | ir.EsModuleImportDirectiveStatement | ir.CjsModuleImportDirectiveStatement | ir.JsNamespaceDestructuringStatement | ir.TypeDereferencedVariableGetterDeclaration | ir.TypeDereferencedVariableSetterDeclaration | ir.TextWithEntityName | ir.Argument | ir.Arguments | ir.Decorator;
|
3
3
|
export type Declaration = ir.PackageMethodDeclaration | ir.PackageTypeDeclaration | ir.PackageVariableDeclaration | ir.PackageVariableGetterDeclaration | ir.PackageVariableSetterDeclaration | ir.PackageVariantTypeDeclaration | ir.NestedMethodDeclaration | ir.LocalVariableDeclaration | ir.TypeConstructorDeclaration | ir.TypeDestructorDeclaration | ir.TypeIndexedGetterDeclaration | ir.TypeIndexedSetterDeclaration | ir.TypeMethodDeclaration | ir.TypeVariableDeclaration | ir.TypeVariableGetterDeclaration | ir.TypeVariableSetterDeclaration | ir.ValueParameterDeclaration | ir.VariantDeclaration | ir.TypeDereferencedVariableGetterDeclaration | ir.TypeDereferencedVariableSetterDeclaration;
|
4
|
-
export type Statement = ir.AssignmentStatement | ir.BlockStatement | ir.BreakLoopStatement | ir.ContinueLoopStatement | ir.DisposeStatement | ir.RunStatement | ir.TryStatement | ir.EmptyStatement | ir.ErrorStatement | ir.ExpressionStatement | ir.ForStatement | ir.IfStatement | ir.NestedMethodDeclarationStatement | ir.LocalVariableDeclarationStatement | ir.LoopStatement | ir.ReturnStatement | ir.SwitchStatement | ir.WhileStatement | ir.YieldStatement | ir.EsModuleImportDirectiveStatement | ir.CjsModuleImportDirectiveStatement | ir.JsNamespaceDestructuringStatement;
|
4
|
+
export type Statement = ir.AssignmentStatement | ir.BlockStatement | ir.BreakLoopStatement | ir.ContinueLoopStatement | ir.DisposeStatement | ir.RunStatement | ir.TryStatement | ir.EmptyStatement | ir.ErrorStatement | ir.ImportantStatement | ir.ExpressionStatement | ir.ForStatement | ir.IfStatement | ir.NestedMethodDeclarationStatement | ir.LocalVariableDeclarationStatement | ir.LoopStatement | ir.ReturnStatement | ir.SwitchStatement | ir.WhileStatement | ir.YieldStatement | ir.EsModuleImportDirectiveStatement | ir.CjsModuleImportDirectiveStatement | ir.JsNamespaceDestructuringStatement;
|
5
5
|
export type Expression = ir.ArrayLiteral | ir.AsExpression | ir.AssertionExpression | ir.AssumptionExpression | ir.AssignmentExpression | ir.BinaryExpression | ir.BooleanLiteral | ir.CallExpression | ir.CharLiteral | ir.CommaExpression | ir.ConstructorCallExpression | ir.NoneLiteral | ir.IndexedAccessExpression | ir.InlineJsExpression | ir.TypeMethodAccessExpression | ir.TypeVariableAccessExpression | ir.IntegerLiteral | ir.IsExpression | ir.NumericLiteral | ir.MethodAccessExpression | ir.MethodLiteral | ir.PrefixUnaryExpression | ir.MeasureLiteral | ir.ReferenceExpression | ir.DereferenceExpression | ir.TextLiteral | ir.TextWithEntityName | ir.TextTemplateLiteral | ir.TernaryExpression | ir.ThisExpression | ir.TypeAccessExpression | ir.VariableAccessExpression | ir.BaseConstructorCallExpression | ir.JsIndexedAccessExpression | ir.JsObjectLiteral | ir.JsPropertyAccessExpression | ir.JsFunctionLiteral | ir.JsTypeOfExpression | ir.JsInstanceOfExpression | ir.JsIdentifierExpression | ir.BaseExpression | ir.OwnConstructorCallExpression;
|
6
6
|
export type TypeMemberDeclaration = ir.TypeVariableDeclaration | ir.ComputedTypeVariableDeclaration | ir.TypeMethodDeclaration | ir.TypeConstructorDeclaration | ir.TypeDestructorDeclaration | ir.TypeIndexedGetterDeclaration | ir.TypeIndexedSetterDeclaration | ir.TypeDereferencedVariableGetterDeclaration | ir.TypeDereferencedVariableSetterDeclaration;
|
7
7
|
export type PackageMemberDeclaration = ir.PackageMethodDeclaration | ir.PackageTypeDeclaration | ir.PackageVariableDeclaration | ir.PackageVariableGetterDeclaration | ir.PackageVariableSetterDeclaration | ir.PackageVariantTypeDeclaration;
|
@@ -37,6 +37,7 @@ export declare class Scanner {
|
|
37
37
|
private scanBinaryDigitSequence;
|
38
38
|
private scanMeasureUnits;
|
39
39
|
private scanSingleLineComment;
|
40
|
+
private scanMultilineLineComment;
|
40
41
|
private scanIdentifier;
|
41
42
|
private scanQuotedIdentifier;
|
42
43
|
static isWhitespaceOrTab(char: string): boolean;
|
@@ -24,7 +24,8 @@ export declare class CompletionService {
|
|
24
24
|
private isRepeatWhileKeywordContext;
|
25
25
|
private isModifierLevelContext;
|
26
26
|
private isElseOrElseIfKeywordContext;
|
27
|
-
private
|
27
|
+
private isCatchKeywordContext;
|
28
|
+
private isFinallyKeywordContext;
|
28
29
|
private isTypeKindCompletionContext;
|
29
30
|
private isFromKeywordContext;
|
30
31
|
private isCaseKeywordContext;
|
@@ -74,8 +74,9 @@ export type VariableDeclaration = VariableDeclaration_entity | VariableDeclarati
|
|
74
74
|
export declare class VariableDeclaration_entity implements IVariableDeclaration {
|
75
75
|
readonly value: e.VariableEntity;
|
76
76
|
readonly localization: Localization;
|
77
|
+
readonly narrowedType?: types.Type | undefined;
|
77
78
|
readonly kind = "entity";
|
78
|
-
constructor(value: e.VariableEntity, localization: Localization);
|
79
|
+
constructor(value: e.VariableEntity, localization: Localization, narrowedType?: types.Type | undefined);
|
79
80
|
getEntity(): e.VariableEntity;
|
80
81
|
getLocalization(): Localization;
|
81
82
|
getType(): types.Type;
|
@@ -85,8 +86,9 @@ export declare class VariableDeclaration_entity implements IVariableDeclaration
|
|
85
86
|
export declare class VariableDeclaration_typeMember implements IVariableDeclaration {
|
86
87
|
readonly value: types.Variable;
|
87
88
|
readonly localization: Localization;
|
89
|
+
readonly narrowedType?: types.Type | undefined;
|
88
90
|
readonly kind = "type-member";
|
89
|
-
constructor(value: types.Variable, localization: Localization);
|
91
|
+
constructor(value: types.Variable, localization: Localization, narrowedType?: types.Type | undefined);
|
90
92
|
getEntity(): e.VariableEntity;
|
91
93
|
getLocalization(): Localization;
|
92
94
|
getType(): types.Type;
|
@@ -57,15 +57,17 @@ export type ReferenceTarget = EntityReferenceTarget | TypeVariableReferenceTarge
|
|
57
57
|
export declare class EntityReferenceTarget {
|
58
58
|
readonly entity: ReferencedEntity;
|
59
59
|
readonly accessKind: AccessKind;
|
60
|
+
readonly narrowedType?: types.Type | undefined;
|
60
61
|
readonly kind = "entity";
|
61
|
-
constructor(entity: ReferencedEntity, accessKind: AccessKind);
|
62
|
+
constructor(entity: ReferencedEntity, accessKind: AccessKind, narrowedType?: types.Type | undefined);
|
62
63
|
}
|
63
64
|
export type ReferencedEntity = VariableEntity | VariantTypeEntity | MethodEntity | TypeParameterEntity | MethodTypeEntity | StructuredTypeEntity | PackageAliasEntity | AliasTypeEntity;
|
64
65
|
export declare class TypeVariableReferenceTarget {
|
65
66
|
readonly variable: types.Variable;
|
66
67
|
readonly accessKind: AccessKind;
|
68
|
+
readonly narrowedType: types.Type | undefined;
|
67
69
|
readonly kind = "type-variable";
|
68
|
-
constructor(variable: types.Variable, accessKind: AccessKind);
|
70
|
+
constructor(variable: types.Variable, accessKind: AccessKind, narrowedType: types.Type | undefined);
|
69
71
|
}
|
70
72
|
export declare class TypeValueParameterReferenceTarget {
|
71
73
|
readonly parameter: types.ValueParameter;
|