@artel/artc 0.9.26060-pre-release → 0.9.26062
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 +8 -2
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +70 -24
- package/build/{chunk-CSGFLTKZ.js → chunk-GFFPHR5G.js} +1 -1
- package/build/{chunk-OBK4F7TH.js → chunk-JHXUTWHI.js} +4004 -2506
- package/build/{chunk-ETOGWBIL.js → chunk-RUKQMGYY.js} +2 -2
- package/build/types/analysis/Analyzer.d.ts +11 -2
- package/build/types/analysis/NodeOrDiagnosticLocation.d.ts +2 -0
- package/build/types/analysis/ResolvedImplementationPackage.d.ts +1 -0
- package/build/types/analysis/TypeArgumentInferrerCore.d.ts +4 -3
- package/build/types/analysis/WellKnownDeclarations.d.ts +6 -0
- package/build/types/analysis/a/ModifierValidator.d.ts +3 -1
- package/build/types/analysis/m/WellKnownTagValidator.d.ts +2 -0
- package/build/types/diagnostic/Diagnostic.d.ts +2 -0
- package/build/types/diagnostic/DiagnosticCode.d.ts +181 -174
- package/build/types/entities/ClosedHierarchyScope.d.ts +13 -0
- package/build/types/entities/EntityLocalizationContext.d.ts +6 -4
- package/build/types/entities/index.d.ts +1 -0
- package/build/types/entities/interfaces/FunctionTypeEntity.d.ts +1 -2
- package/build/types/entities/interfaces/PackageEntity.d.ts +1 -3
- package/build/types/entities/interfaces/StructuredTypeEntity.d.ts +23 -1
- package/build/types/entities/intrinsic/IntrinsicStructuredTypeEntity.d.ts +4 -3
- package/build/types/entities/source/a/SourceFunctionTypeEntity.d.ts +1 -2
- package/build/types/entities/source/a/SourcePackageEntity.d.ts +1 -5
- package/build/types/entities/source/a/SourceStructuredTypeEntity.d.ts +11 -1
- package/build/types/entities/source/m/SourceFunctionTypeEntity.d.ts +1 -2
- package/build/types/entities/source/m/SourcePackageEntity.d.ts +1 -5
- package/build/types/entities/source/m/SourceStructuredTypeEntity.d.ts +12 -1
- package/build/types/entities/translated/BaseTranslatedTypeMemberAccessorEntity.d.ts +3 -2
- package/build/types/entities/translated/TranslatedAliasTypeEntity.d.ts +2 -2
- package/build/types/entities/translated/TranslatedDereferenceOperatorEntity.d.ts +3 -3
- package/build/types/entities/translated/TranslatedExtensionTypeEntity.d.ts +3 -3
- package/build/types/entities/translated/TranslatedFunctionEntity.d.ts +3 -3
- package/build/types/entities/translated/TranslatedFunctionTypeEntity.d.ts +3 -4
- package/build/types/entities/translated/TranslatedIndexerEntity.d.ts +4 -4
- package/build/types/entities/translated/TranslatedPackageEntity.d.ts +1 -3
- package/build/types/entities/translated/TranslatedPackageMemberAccessorEntity.d.ts +3 -2
- package/build/types/entities/translated/TranslatedParameterEntity.d.ts +3 -3
- package/build/types/entities/translated/TranslatedReducedTypeEntity.d.ts +2 -2
- package/build/types/entities/translated/TranslatedStructuredTypeEntity.d.ts +17 -8
- package/build/types/entities/translated/TranslatedTypeMemberAccessorEntity.d.ts +2 -2
- package/build/types/entities/translated/TranslatedTypeParameterEntity.d.ts +2 -2
- package/build/types/entities/translated/TranslatedVariableEntity.d.ts +5 -5
- package/build/types/entities/translated/TranslatedVariantTypeEntity.d.ts +3 -3
- package/build/types/entities/translated/source/m/SourceTranslatedIndexerEntity.d.ts +2 -2
- package/build/types/services/a/CompletionService.d.ts +5 -1
- package/build/types/services/common/node-semantic-info/NodeSemanticInfoService.d.ts +2 -2
- package/build/types/tree/a/ModifierFlags.d.ts +14 -11
- package/build/types/tree/a/SyntaxFactory.d.ts +102 -8
- package/build/types/tree/a/SyntaxToCode.d.ts +84 -2
- package/build/types/tree/m/WellKnownTagFlags.d.ts +11 -8
- package/build/types/ts-interop/TypeEntities.d.ts +13 -4
- package/build/types/types/StructuredType.d.ts +20 -0
- package/build/types/types/Substitutions.d.ts +1 -1
- package/build/types/types/TypeVisitor.d.ts +6 -0
- package/build/types/types/index.d.ts +1 -0
- package/package.json +1 -1
package/build/Cli.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
CommandLineCompiler
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-RUKQMGYY.js";
|
|
5
|
+
import "./chunk-GFFPHR5G.js";
|
|
6
6
|
import {
|
|
7
7
|
__async
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-JHXUTWHI.js";
|
|
9
9
|
|
|
10
10
|
// source/Cli.ts
|
|
11
11
|
function main() {
|
package/build/api/Api.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Compiler,
|
|
3
3
|
DiagnosticFormatter
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-GFFPHR5G.js";
|
|
5
5
|
import {
|
|
6
6
|
AccessKind,
|
|
7
7
|
AccessedFunction_entity,
|
|
@@ -42,6 +42,8 @@ import {
|
|
|
42
42
|
Cached,
|
|
43
43
|
CancelledError,
|
|
44
44
|
CharacterCodes,
|
|
45
|
+
ClosedHierarchyScope_file,
|
|
46
|
+
ClosedHierarchyScope_package,
|
|
45
47
|
CommonAnalyzerState,
|
|
46
48
|
Compilation,
|
|
47
49
|
CompilationKind,
|
|
@@ -74,6 +76,7 @@ import {
|
|
|
74
76
|
DiagnosticFlags,
|
|
75
77
|
DiagnosticKind,
|
|
76
78
|
DiagnosticLocation,
|
|
79
|
+
DirectSubtypeInfo,
|
|
77
80
|
DirectoryEntry,
|
|
78
81
|
DisplayableArray,
|
|
79
82
|
DisplayableOrPrimitive,
|
|
@@ -318,7 +321,7 @@ import {
|
|
|
318
321
|
withoutQuotes,
|
|
319
322
|
withoutTemplateQuotes,
|
|
320
323
|
yieldTask
|
|
321
|
-
} from "../chunk-
|
|
324
|
+
} from "../chunk-JHXUTWHI.js";
|
|
322
325
|
export {
|
|
323
326
|
AccessKind,
|
|
324
327
|
AccessedFunction_entity,
|
|
@@ -359,6 +362,8 @@ export {
|
|
|
359
362
|
Cached,
|
|
360
363
|
CancelledError,
|
|
361
364
|
CharacterCodes,
|
|
365
|
+
ClosedHierarchyScope_file,
|
|
366
|
+
ClosedHierarchyScope_package,
|
|
362
367
|
CommonAnalyzerState,
|
|
363
368
|
Compilation,
|
|
364
369
|
CompilationKind,
|
|
@@ -393,6 +398,7 @@ export {
|
|
|
393
398
|
DiagnosticFormatter,
|
|
394
399
|
DiagnosticKind,
|
|
395
400
|
DiagnosticLocation,
|
|
401
|
+
DirectSubtypeInfo,
|
|
396
402
|
DirectoryEntry,
|
|
397
403
|
DisplayableArray,
|
|
398
404
|
DisplayableOrPrimitive,
|
package/build/api/ApiNodeJS.js
CHANGED
|
@@ -6,9 +6,9 @@ import {
|
|
|
6
6
|
PhysicalFileSystem,
|
|
7
7
|
PhysicalTypeScriptLibrariesProvider,
|
|
8
8
|
PrintingDiagnosticAcceptor
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
9
|
+
} from "../chunk-RUKQMGYY.js";
|
|
10
|
+
import "../chunk-GFFPHR5G.js";
|
|
11
|
+
import "../chunk-JHXUTWHI.js";
|
|
12
12
|
export {
|
|
13
13
|
CommandLineCompiler,
|
|
14
14
|
FileSystemUri,
|
package/build/api/ApiServices.js
CHANGED
|
@@ -146,7 +146,7 @@ import {
|
|
|
146
146
|
traverseTreeAsync,
|
|
147
147
|
traverseTreeAsync2,
|
|
148
148
|
yieldTask
|
|
149
|
-
} from "../chunk-
|
|
149
|
+
} from "../chunk-JHXUTWHI.js";
|
|
150
150
|
|
|
151
151
|
// source/services/common/Types.ts
|
|
152
152
|
import * as ls from "vscode-languageserver";
|
|
@@ -1526,7 +1526,7 @@ var UniversalParameter = class {
|
|
|
1526
1526
|
};
|
|
1527
1527
|
|
|
1528
1528
|
// source/services/a/CompletionService.ts
|
|
1529
|
-
var CompletionServiceA = class {
|
|
1529
|
+
var CompletionServiceA = class _CompletionServiceA {
|
|
1530
1530
|
constructor() {
|
|
1531
1531
|
this.cache = new CompletionItemInfoCache();
|
|
1532
1532
|
this.completionItemInfoContext_ = new Cached();
|
|
@@ -2105,8 +2105,9 @@ var CompletionServiceA = class {
|
|
|
2105
2105
|
if (syntaxContext.precedingExpression !== void 0) {
|
|
2106
2106
|
kinds.add(48 /* As */).add(20 /* Is */).add(27 /* And */).add(28 /* Or */).add(29 /* Xor */).add(34 /* When */);
|
|
2107
2107
|
}
|
|
2108
|
-
|
|
2109
|
-
|
|
2108
|
+
const modifierLevelKeywordKinds = this.ifModifierLevelContextThenKinds(positionDescription);
|
|
2109
|
+
if (modifierLevelKeywordKinds !== void 0) {
|
|
2110
|
+
modifierLevelKeywordKinds.forEach((k) => kinds.add(k));
|
|
2110
2111
|
}
|
|
2111
2112
|
if (this.isRepeatWhileKeywordContext(positionDescription)) {
|
|
2112
2113
|
kinds.add(32 /* RepeatWhile */);
|
|
@@ -2129,12 +2130,54 @@ var CompletionServiceA = class {
|
|
|
2129
2130
|
const tokenOrKeyword = positionDescription.tokenOrKeyword;
|
|
2130
2131
|
return tokenOrKeyword.isToken(28 /* CloseBrace */) && tokenOrKeyword.parent.kind === 91 /* StatementBlock */ && tokenOrKeyword.parent.parent.kind === 112 /* LoopStatement */;
|
|
2131
2132
|
}
|
|
2132
|
-
|
|
2133
|
+
static {
|
|
2134
|
+
this.packageLevelHidingLevelKinds = [
|
|
2135
|
+
55 /* InFile */,
|
|
2136
|
+
56 /* InPackage */
|
|
2137
|
+
];
|
|
2138
|
+
}
|
|
2139
|
+
static {
|
|
2140
|
+
this.typeLevelHidingLevelKinds = [
|
|
2141
|
+
57 /* InType */,
|
|
2142
|
+
54 /* InHierarchy */,
|
|
2143
|
+
55 /* InFile */,
|
|
2144
|
+
56 /* InPackage */
|
|
2145
|
+
];
|
|
2146
|
+
}
|
|
2147
|
+
static {
|
|
2148
|
+
this.packageLevelAbstractLevelKinds = [
|
|
2149
|
+
55 /* InFile */,
|
|
2150
|
+
56 /* InPackage */
|
|
2151
|
+
];
|
|
2152
|
+
}
|
|
2153
|
+
ifModifierLevelContextThenKinds(positionDescription) {
|
|
2133
2154
|
if (positionDescription.kind !== "after-token-or-keyword") {
|
|
2134
|
-
return
|
|
2155
|
+
return void 0;
|
|
2135
2156
|
}
|
|
2136
2157
|
const tokenOrKeyword = positionDescription.tokenOrKeyword;
|
|
2137
|
-
|
|
2158
|
+
if (!(tokenOrKeyword.isToken(50 /* OpenParenthesis */) && tokenOrKeyword.parent.kind === 151 /* Modifier */)) {
|
|
2159
|
+
return void 0;
|
|
2160
|
+
}
|
|
2161
|
+
const modifier = tokenOrKeyword.parent;
|
|
2162
|
+
if (modifier.value.keywordKind === 42 /* Hidden */) {
|
|
2163
|
+
const modifierOwner = modifier.parent.parent;
|
|
2164
|
+
if (isPackageMemberDeclaration(modifierOwner)) {
|
|
2165
|
+
return _CompletionServiceA.packageLevelHidingLevelKinds;
|
|
2166
|
+
} else if (isTypeMemberDeclaration(modifierOwner)) {
|
|
2167
|
+
return _CompletionServiceA.typeLevelHidingLevelKinds;
|
|
2168
|
+
} else {
|
|
2169
|
+
Debug.never(modifierOwner);
|
|
2170
|
+
}
|
|
2171
|
+
} else if (modifier.value.keywordKind === 44 /* Abstract */) {
|
|
2172
|
+
const modifierOwner = modifier.parent.parent;
|
|
2173
|
+
if (isPackageMemberDeclaration(modifierOwner)) {
|
|
2174
|
+
return _CompletionServiceA.packageLevelAbstractLevelKinds;
|
|
2175
|
+
} else {
|
|
2176
|
+
return void 0;
|
|
2177
|
+
}
|
|
2178
|
+
} else {
|
|
2179
|
+
return void 0;
|
|
2180
|
+
}
|
|
2138
2181
|
}
|
|
2139
2182
|
isElseOrElseIfKeywordContext(positionDescription) {
|
|
2140
2183
|
if (positionDescription.kind !== "after-token-or-keyword") {
|
|
@@ -4146,15 +4189,15 @@ var DefaultSwitchMatchNodeSemanticInfo = class {
|
|
|
4146
4189
|
|
|
4147
4190
|
// source/services/common/node-semantic-info/NodeSemanticInfoService.ts
|
|
4148
4191
|
var NodeSemanticInfoService = class {
|
|
4149
|
-
static getBetterReferenceTargetsOrPreserve(
|
|
4192
|
+
static getBetterReferenceTargetsOrPreserve(analyzer, info) {
|
|
4150
4193
|
const currentTargets = info.betterTargets ?? info.targets;
|
|
4151
|
-
const betterTargets = currentTargets.map((t) => this.getBetterReferenceTargets(t)).filter((t) => t !== void 0).flat();
|
|
4194
|
+
const betterTargets = currentTargets.map((t) => this.getBetterReferenceTargets(analyzer, t)).filter((t) => t !== void 0).flat();
|
|
4152
4195
|
if (isNonEmptyArray(betterTargets)) {
|
|
4153
4196
|
return new ReferenceNodeSemanticInfo(info.targets, info.isAmbiguous, betterTargets);
|
|
4154
4197
|
}
|
|
4155
4198
|
return info;
|
|
4156
4199
|
}
|
|
4157
|
-
static getBetterReferenceTargets(original) {
|
|
4200
|
+
static getBetterReferenceTargets(analyzer, original) {
|
|
4158
4201
|
let result;
|
|
4159
4202
|
let currentTargets = [original];
|
|
4160
4203
|
let betterTargets;
|
|
@@ -4180,7 +4223,9 @@ var NodeSemanticInfoService = class {
|
|
|
4180
4223
|
let field;
|
|
4181
4224
|
const translation = currentTarget.entity.translation;
|
|
4182
4225
|
if (translation !== void 0) {
|
|
4183
|
-
const localizationContext =
|
|
4226
|
+
const localizationContext = analyzer.getLocalizationContextForPackage(
|
|
4227
|
+
currentTarget.entity.getContainingPackage()
|
|
4228
|
+
);
|
|
4184
4229
|
field = localizationContext.createLocalizedField(
|
|
4185
4230
|
specialVariableInfo.fieldOrBaseConstructorParameter
|
|
4186
4231
|
);
|
|
@@ -4192,7 +4237,9 @@ var NodeSemanticInfoService = class {
|
|
|
4192
4237
|
let parameter;
|
|
4193
4238
|
const translation = currentTarget.entity.translation;
|
|
4194
4239
|
if (translation !== void 0) {
|
|
4195
|
-
const localizationContext =
|
|
4240
|
+
const localizationContext = analyzer.getLocalizationContextForPackage(
|
|
4241
|
+
currentTarget.entity.getContainingPackage()
|
|
4242
|
+
);
|
|
4196
4243
|
parameter = localizationContext.createLocalizedParameter(
|
|
4197
4244
|
specialVariableInfo.fieldOrBaseConstructorParameter
|
|
4198
4245
|
);
|
|
@@ -4240,7 +4287,9 @@ var NodeSemanticInfoService = class {
|
|
|
4240
4287
|
let field;
|
|
4241
4288
|
const translation = currentTarget.parameter.entity.translation;
|
|
4242
4289
|
if (translation !== void 0) {
|
|
4243
|
-
const localizationContext =
|
|
4290
|
+
const localizationContext = analyzer.getLocalizationContextForPackage(
|
|
4291
|
+
currentTarget.parameter.entity.getContainingPackage()
|
|
4292
|
+
);
|
|
4244
4293
|
field = localizationContext.createLocalizedField(
|
|
4245
4294
|
specialVariableInfo.fieldOrBaseConstructorParameter
|
|
4246
4295
|
);
|
|
@@ -4252,7 +4301,9 @@ var NodeSemanticInfoService = class {
|
|
|
4252
4301
|
let parameter;
|
|
4253
4302
|
const translation = currentTarget.parameter.entity.translation;
|
|
4254
4303
|
if (translation !== void 0) {
|
|
4255
|
-
const localizationContext =
|
|
4304
|
+
const localizationContext = analyzer.getLocalizationContextForPackage(
|
|
4305
|
+
currentTarget.parameter.entity.getContainingPackage()
|
|
4306
|
+
);
|
|
4256
4307
|
parameter = localizationContext.createLocalizedParameter(
|
|
4257
4308
|
specialVariableInfo.fieldOrBaseConstructorParameter
|
|
4258
4309
|
);
|
|
@@ -8190,13 +8241,8 @@ var ReferencesService = class {
|
|
|
8190
8241
|
return { name: entity.getName() };
|
|
8191
8242
|
case 2 /* Type */: {
|
|
8192
8243
|
switch (entity.typeEntityKind) {
|
|
8193
|
-
case 0 /* Function */:
|
|
8194
|
-
const naming = entity.getNaming();
|
|
8195
|
-
if (naming.kind === "named") {
|
|
8196
|
-
return { name: naming.value };
|
|
8197
|
-
}
|
|
8244
|
+
case 0 /* Function */:
|
|
8198
8245
|
return void 0;
|
|
8199
|
-
}
|
|
8200
8246
|
case 1 /* Structured */: {
|
|
8201
8247
|
const naming = entity.getNaming();
|
|
8202
8248
|
if (naming.kind === "named") {
|
|
@@ -10833,16 +10879,16 @@ var EntityToSyntax2 = class {
|
|
|
10833
10879
|
switch (entity.kind) {
|
|
10834
10880
|
case 2 /* Type */: {
|
|
10835
10881
|
if (entity.typeEntityKind === 1 /* Structured */ && entity.structuredTypeKind === 1 /* Structure */) {
|
|
10836
|
-
wkTagFlags.add(
|
|
10882
|
+
wkTagFlags.add(131072 /* Plain */);
|
|
10837
10883
|
}
|
|
10838
10884
|
if (entity.typeEntityKind === 1 /* Structured */ && entity.structuredTypeKind === 2 /* Aspect */) {
|
|
10839
|
-
wkTagFlags.add(
|
|
10885
|
+
wkTagFlags.add(262144 /* Aspect */);
|
|
10840
10886
|
}
|
|
10841
10887
|
if (entity.typeEntityKind === 6 /* Extension */) {
|
|
10842
|
-
wkTagFlags.add(
|
|
10888
|
+
wkTagFlags.add(1048576 /* Extension */);
|
|
10843
10889
|
}
|
|
10844
10890
|
if (TypeEntity.isWrapperType(entity)) {
|
|
10845
|
-
wkTagFlags.add(
|
|
10891
|
+
wkTagFlags.add(524288 /* Wrapper */);
|
|
10846
10892
|
}
|
|
10847
10893
|
if (entity.typeEntityKind === 1 /* Structured */ && entity.isAbstract()) {
|
|
10848
10894
|
wkTagFlags.add(32 /* Abstract */);
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
WellKnownDeclarationsLoadError,
|
|
12
12
|
__async,
|
|
13
13
|
createTsInteropInputsForCompilation
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-JHXUTWHI.js";
|
|
15
15
|
|
|
16
16
|
// source/diagnostic/DiagnosticFormatter.ts
|
|
17
17
|
var DiagnosticFormatter = class _DiagnosticFormatter {
|