@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.
Files changed (39) hide show
  1. package/build/Cli.js +3 -3
  2. package/build/api/Api.js +6 -4
  3. package/build/api/ApiNodeJS.js +3 -3
  4. package/build/api/ApiServices.js +394 -284
  5. package/build/{chunk-ASXPPFGP.js → chunk-MBMOAUK7.js} +3 -3
  6. package/build/{chunk-RHY36EE7.js → chunk-ODWG5ZXF.js} +4060 -2261
  7. package/build/{chunk-AUDD2JDS.js → chunk-UZK7JCND.js} +3 -3
  8. package/build/types/analysis/Analyzer.d.ts +53 -6
  9. package/build/types/analysis/ControlFlowGraphBuilder.d.ts +121 -0
  10. package/build/types/analysis/ControlFlowGraphVisualizer.d.ts +12 -0
  11. package/build/types/analysis/DiagnosticCollector.d.ts +3 -0
  12. package/build/types/analysis/NodeTypeUtils.d.ts +4 -1
  13. package/build/types/analysis/SemanticContext.d.ts +7 -0
  14. package/build/types/analysis/SemanticContextBuilder.d.ts +2 -0
  15. package/build/types/analysis/StatementBlockScopeBuilder.d.ts +19 -17
  16. package/build/types/analysis/TypeNarrower.d.ts +62 -0
  17. package/build/types/common/Range.d.ts +1 -0
  18. package/build/types/diagnostic/DiagnosticCode.d.ts +131 -123
  19. package/build/types/diagnostic/DiagnosticData.d.ts +2 -1
  20. package/build/types/emitter/IrBuilder.d.ts +3 -1
  21. package/build/types/emitter/IrToJs.d.ts +1 -0
  22. package/build/types/emitter/Transformer.d.ts +2 -0
  23. package/build/types/emitter/ir/Nodes.d.ts +86 -78
  24. package/build/types/emitter/ir/types.d.ts +2 -2
  25. package/build/types/parser/Scanner.d.ts +1 -0
  26. package/build/types/services/CompletionService.d.ts +2 -1
  27. package/build/types/services/DisplayService.d.ts +4 -2
  28. package/build/types/services/NodeSemanticInfo.d.ts +4 -2
  29. package/build/types/tree/KeywordKind.d.ts +41 -40
  30. package/build/types/tree/NodeKind.d.ts +63 -60
  31. package/build/types/tree/green/Nodes.d.ts +124 -86
  32. package/build/types/tree/green/SyntaxFactory.d.ts +12 -10
  33. package/build/types/tree/green/SyntaxToCode.d.ts +1 -0
  34. package/build/types/tree/green/Token.d.ts +1 -1
  35. package/build/types/tree/green/Utils.d.ts +1 -1
  36. package/build/types/tree/red/Nodes.d.ts +103 -63
  37. package/build/types/tree/red/Utils.d.ts +1 -1
  38. package/build/types/types/TypeFactory.d.ts +2 -1
  39. package/package.json +1 -1
@@ -1,125 +1,133 @@
1
1
  export declare enum DiagnosticCode {
2
- IdentifierExpected = 0,
3
- TypeNameExpected = 1,
4
- PackageNameExpected = 2,
5
- TypeMemberDeclarationExpected = 3,
6
- SourceFileMemberExpected = 4,
7
- EnumerationVariableDeclarationExpected = 5,
8
- StatementExpected = 6,
9
- ExpressionExpected = 7,
10
- BaseTypeNameExpected = 8,
11
- TypeSpecifierExpected = 9,
12
- TypeBodyExpected = 10,
13
- MethodCallArgumentExpected = 11,
14
- IndexedAccessArgumentExpected = 12,
15
- TagArgumentExpected = 13,
16
- TypeParameterExpected = 14,
17
- ParameterExpected = 15,
18
- RunStatementClauseExpected = 16,
19
- CatchClauseOrFinallyClauseExpected = 17,
20
- PackageImportExpected = 18,
21
- UsingDirectiveOrSourceFileMemberExpected = 19,
22
- TypeMemberTranslationExpected = 20,
23
- TranslationExpected = 21,
24
- Expected0But1Found = 22,
25
- InvalidTextTemplateLiteral = 23,
26
- RunKeywordCreationKeywordOrModifierListExpected = 24,
27
- ModifierListExpected = 25,
28
- HidingLevelExpected = 26,
29
- ParameterNameCanContainOnlyOneBackQuote = 27,
30
- FieldNameCanContainOnlyTwoBackQuote = 28,
31
- BackQuotesCanOnlyBeUsedInParameterAndFieldNames = 29,
32
- NameThatMatchesKeywordMustBeEnclosedInSingleQuotes = 30,
33
- TagNameExpected = 31,
34
- TypeCannotBeUsedAsValue = 32,
35
- PackageMemberNotFound = 33,
36
- TypeMemberNotFound = 34,
37
- CannotAccessStaticMembersOnTypeParameter = 35,
38
- IndexerOfTheSpecifiedTypeNotFound = 36,
39
- DereferenceOperatorOfTheSpecifiedTypeNotFound = 37,
40
- IndexerNotFound = 38,
41
- CannotCreateInstanceOfAspect = 39,
42
- CannotCreateInstanceOfTypeParameter = 40,
43
- CannotCreateInstanceOfUnresolvedType = 41,
44
- TypeConstructorNotFound = 42,
45
- CannotInvokeExpression = 43,
46
- NamedArgumentExpectedButPositionalArgumentFound = 44,
47
- ParameterWithGivenNameNotFound = 45,
48
- ArgumentForParameterAlreadyPassed = 46,
49
- PackageAliasCannotBeUsedAsValue = 47,
50
- PackageNameCannotBeUsedAsValue = 48,
51
- UnknownVariable = 49,
52
- UnknownType = 50,
53
- TypeWithArity0NotFound = 51,
54
- VariableUsedBeforeBeingDeclared = 52,
55
- Type0IsNotAssignableToType1 = 53,
56
- VariableNotFound = 54,
57
- MethodNotFound = 55,
58
- UnknownPackage = 56,
59
- CannotAssignValueToExpression = 57,
60
- NotEveryRequiredParameterIsProvidedWithArgument = 58,
61
- ParameterForPositionalArgumentNotFound = 59,
62
- CannotDetermineTargetTypeToCallTheConstructor = 60,
63
- AmbiguousAccess = 61,
64
- PackageNameConflictsWithDeclarationName = 62,
65
- CanNotAssignValueToContextVariable = 63,
66
- ExpectedPackageNameOrAliasButFoundType = 64,
67
- TypeExpected = 65,
68
- NameOfTypeOrPackageNotFound = 66,
69
- TypeIsNotATag = 67,
70
- ExpressionOfType0CanNotBeUsedForEnumeration = 68,
71
- Operator0IsNotDefinedForTypes1And2 = 69,
72
- Operator0IsNotDefinedForType1 = 70,
73
- VariantMustHaveAssociatedValue = 71,
74
- PackageMemberOrPackageNotFound = 72,
75
- TranslationsCanOnlyBeDeclaredInTranslationPackage = 73,
76
- UnknownTranslatedPackage0 = 74,
77
- BaseCannotBeUsedInThisContext = 75,
78
- OverriddenMethodNotFound = 76,
79
- ObjectCannotBeUsedInThisContext = 77,
80
- BaseCannotBeUsedAsAnExpressionInItself = 78,
81
- InterfacePackageMustNotContainImplementation = 79,
82
- InterfacePackageVariablesMustNotHaveInitializers = 80,
83
- BodyIsMissing = 81,
84
- AbstractTypeMembersMustNotHaveBody = 82,
85
- AbstractVariablesMustNotHaveInitializers = 83,
86
- PackageIsAlreadyImportedInAnotherLanguage = 84,
87
- OnlySubprogramsWithReturnTypeCanReturnValue = 85,
88
- MethodsUsingYieldStatementCanNotReturnValue = 86,
89
- YieldStatementCanNotBeUsedInAnonymousMethods = 87,
90
- YieldStatementCanNotBeUsedHere = 88,
91
- MethodsUsingYieldStatementMustHaveEnumerableAsReturnType = 89,
92
- YieldStatementCanNotBeUsedInTryStatementThatHasCatchClause = 90,
93
- YieldStatementCanNotBeUsedInFinallyClause = 91,
94
- SubprogramMustReturnValue = 92,
95
- ResultVariableCanNotBeUsedInMethodsUsingYieldStatement = 93,
96
- TypeAliasReferencesItself = 94,
97
- TypeParameterHasCircularConstraint = 95,
98
- BaseTypeCausesInheritanceCycle = 96,
99
- OnlyGenericTypesAndFunctionsCanBeSpecialized = 97,
100
- Expected0TypeArguments = 98,
101
- ExpectedFrom0To1TypeArguments = 99,
102
- Type0IsNotAssignableToConstraint1 = 100,
103
- VariableIsDeclaredButNotUsed = 101,
104
- DefaultConstructorArgumentsMustBeNamed = 102,
105
- IncorrectBodyOfRedefinableAliasTypeMethod = 103,
106
- TheFollowingDeclarationsAreNotTranslated0 = 104,
107
- TheFollowingDeclarationAreNotTranslated0And1More = 105,
108
- OperatorMustNotBeStatic = 106,
109
- Operator0MustNotHaveParameters = 107,
110
- Operator0MustHaveOneParameter = 108,
111
- Operator0MustHaveNoMoreThanOneParameter = 109,
112
- CorrespondingRedefinableTypeMemberNotFound = 110,
113
- ConstructorCanNotBeRedefinable = 111,
114
- ConstructorCanNotBeRedefined = 112,
115
- AsyncMethodCanOnlyBeCalledFromMethodMarkedWithAsyncModifier = 113,
116
- TagNotFound = 114,
117
- TypeOrMethodNameExpected = 115,
118
- PackageNameOrAliasExpected = 116,
119
- CanNotFindTsLibDirectoryBaseSearchPaths0 = 117,
120
- SourceFile0IsNotPartOfThePackageAndWontBeLoaded = 118,
121
- ProgramWithoutMainPackageCanNotBeCompiled = 119,
122
- JsonConfigurationValidationError = 120,
123
- StandardPackage0NotFound = 121,
124
- Declaration0NotFoundInStandardPackage1 = 122
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
  }
@@ -16,5 +16,6 @@ export declare const enum DiagnosticKind {
16
16
  export declare const enum DiagnosticFlags {
17
17
  None = 0,
18
18
  Unused = 1,
19
- Deprecated = 2
19
+ Unreachable = 2,
20
+ Deprecated = 4
20
21
  }
@@ -18,7 +18,8 @@ export declare class IrBuilder {
18
18
  build(): ir.PackageMemberDeclaration[];
19
19
  private buildPackageMemberDeclarationList;
20
20
  private buildPackageConstructorDeclaration;
21
- private buildBodyOfSubprogramWithResult;
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
- ExpressionStatement = 19,
917
- FinallyClause = 20,
918
- ForStatement = 21,
919
- PackageMethodDeclaration = 22,
920
- PackageTypeDeclaration = 23,
921
- PackageVariableDeclaration = 24,
922
- PackageVariableGetterDeclaration = 25,
923
- PackageVariableSetterDeclaration = 26,
924
- PackageVariantTypeDeclaration = 27,
925
- IfStatement = 28,
926
- IndexedAccessExpression = 29,
927
- IntegerLiteral = 30,
928
- IsExpression = 31,
929
- NestedMethodDeclaration = 32,
930
- NestedMethodDeclarationStatement = 33,
931
- LocalVariableDeclaration = 34,
932
- LocalVariableDeclarationStatement = 35,
933
- NumericLiteral = 36,
934
- CatchClause = 37,
935
- MethodLiteral = 38,
936
- PrefixUnaryExpression = 39,
937
- MeasureLiteral = 40,
938
- ReferenceExpression = 41,
939
- LoopStatement = 42,
940
- ReturnStatement = 43,
941
- Package = 44,
942
- TextLiteral = 45,
943
- TextTemplateLiteral = 46,
944
- TypeConstructorDeclaration = 47,
945
- TypeDestructorDeclaration = 48,
946
- TypeIndexedGetterDeclaration = 49,
947
- TypeIndexedSetterDeclaration = 50,
948
- TypeMethodDeclaration = 51,
949
- TypeVariableDeclaration = 52,
950
- TypeVariableGetterDeclaration = 53,
951
- TypeVariableSetterDeclaration = 54,
952
- SwitchStatement = 55,
953
- TernaryExpression = 56,
954
- ThisExpression = 57,
955
- ValueParameterDeclaration = 58,
956
- VariantDeclaration = 59,
957
- WhileStatement = 60,
958
- YieldStatement = 61,
959
- ArrayLiteral = 62,
960
- TypeAccessExpression = 63,
961
- VariableAccessExpression = 64,
962
- MethodAccessExpression = 65,
963
- ImplicitVariantAccessExpression = 66,
964
- VariantAccessExpression = 67,
965
- TypeVariableAccessExpression = 68,
966
- TypeMethodAccessExpression = 69,
967
- ConstructorCallExpression = 70,
968
- InlineJsExpression = 71,
969
- AssignmentExpression = 72,
970
- CommaExpression = 73,
971
- BaseConstructorCallExpression = 74,
972
- JsImportSpecifier = 75,
973
- JsIndexedAccessExpression = 76,
974
- EsModuleImportDirectiveStatement = 77,
975
- CjsModuleImportDirectiveStatement = 78,
976
- JsObjectLiteral = 79,
977
- NamedJsObjectLiteralProperty = 80,
978
- SpreadJsObjectLiteralProperty = 81,
979
- JsPropertyAccessExpression = 82,
980
- JsFunctionLiteral = 83,
981
- JsTypeOfExpression = 84,
982
- JsInstanceOfExpression = 85,
983
- JsIdentifierExpression = 86,
984
- DereferenceExpression = 87,
985
- BaseExpression = 88,
986
- OwnConstructorCallExpression = 89,
987
- TypeDereferencedVariableGetterDeclaration = 90,
988
- TypeDereferencedVariableSetterDeclaration = 91,
989
- JsNamespaceDestructuringStatement = 92,
990
- ComputedTypeVariableDeclaration = 93,
991
- TextWithEntityName = 94,
992
- Arguments = 95,
993
- Decorator = 96
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 isRunStatementAccessorListContext;
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;