@artel/artc 0.6.25278 → 0.6.25280
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 +2 -12
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +350 -299
- package/build/{chunk-A2QTLTGI.js → chunk-LLI2DYRX.js} +142 -166
- package/build/{chunk-L44WWCT7.js → chunk-W3UL6UED.js} +1 -1
- package/build/{chunk-4C7CEJJF.js → chunk-YIFO3FBO.js} +2 -2
- package/build/types/analysis/Analyzer.d.ts +3 -1
- package/build/types/analysis/UserDefinableBinaryOperatorResolver.d.ts +1 -1
- package/build/types/analysis/UserDefinableUnaryOperatorResolver.d.ts +1 -1
- package/build/types/api/ApiServices.d.ts +1 -1
- package/build/types/common/index.d.ts +1 -4
- package/build/types/{common → diagnostic}/WithDiagnostics.d.ts +1 -1
- package/build/types/services/{CustomCommand.d.ts → CustomRequests.d.ts} +20 -51
- package/build/types/services/DeleteBlockFromScriptService.d.ts +6 -0
- package/build/types/services/LanguageServer.d.ts +3 -2
- package/build/types/services/source-generation/SourceGenerationService.d.ts +3 -2
- package/package.json +1 -1
- package/build/types/common/Delayed.d.ts +0 -7
- /package/build/types/{common → analysis}/TreeQuery.d.ts +0 -0
|
@@ -70,17 +70,17 @@ var __yieldStar = (value) => {
|
|
|
70
70
|
};
|
|
71
71
|
|
|
72
72
|
// source/common/PackageDialect.ts
|
|
73
|
-
var PackageDialect = /* @__PURE__ */ ((
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
return
|
|
73
|
+
var PackageDialect = /* @__PURE__ */ ((PackageDialect48) => {
|
|
74
|
+
PackageDialect48[PackageDialect48["ArtelA"] = 0] = "ArtelA";
|
|
75
|
+
PackageDialect48[PackageDialect48["ArtelM"] = 1] = "ArtelM";
|
|
76
|
+
return PackageDialect48;
|
|
77
77
|
})(PackageDialect || {});
|
|
78
78
|
|
|
79
79
|
// source/common/PackageLocale.ts
|
|
80
|
-
var PackageLocale = /* @__PURE__ */ ((
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
return
|
|
80
|
+
var PackageLocale = /* @__PURE__ */ ((PackageLocale54) => {
|
|
81
|
+
PackageLocale54[PackageLocale54["En"] = 0] = "En";
|
|
82
|
+
PackageLocale54[PackageLocale54["Ru"] = 1] = "Ru";
|
|
83
|
+
return PackageLocale54;
|
|
84
84
|
})(PackageLocale || {});
|
|
85
85
|
var locales = [
|
|
86
86
|
{ locale: 0 /* En */, code: "en", names: ["english", "\u0430\u043D\u0433\u043B\u0438\u0439\u0441\u043A\u0438\u0439"] },
|
|
@@ -764,8 +764,8 @@ var UniqueWithComparatorQuery = class extends Query {
|
|
|
764
764
|
};
|
|
765
765
|
|
|
766
766
|
// source/common/Constants.ts
|
|
767
|
-
var ArtelVersion = true ? "0.6.
|
|
768
|
-
var ArtelSourceFileExtensions = [".\u0430\u0440\u0442", ".\u0430\u0440\u0442\u0435\u043B\u044C", ".art", ".artel"];
|
|
767
|
+
var ArtelVersion = true ? "0.6.25280" : "";
|
|
768
|
+
var ArtelSourceFileExtensions = [".\u0430\u0440\u0442", ".\u0430\u0440\u0442\u0435\u043B\u044C", ".art", ".artel", ".\u0430\u0440\u0442\u043C", ".\u0430\u0440\u0442\u0435\u043B\u044C\u043C", ".artm", ".artelm"];
|
|
769
769
|
var ArtelSourceFileExtensionSet = new Set(ArtelSourceFileExtensions);
|
|
770
770
|
var ArtelSourceAndConfigurationFileExtensionSet = new Set(ArtelSourceFileExtensionSet).add(".json");
|
|
771
771
|
var ConfigurationDirectoryNamesByLocale = /* @__PURE__ */ new Map([
|
|
@@ -1053,26 +1053,6 @@ var GenericCancellationToken = class {
|
|
|
1053
1053
|
}
|
|
1054
1054
|
};
|
|
1055
1055
|
|
|
1056
|
-
// source/common/Delayed.ts
|
|
1057
|
-
var Delayed = class {
|
|
1058
|
-
constructor() {
|
|
1059
|
-
this.hasValue_ = false;
|
|
1060
|
-
}
|
|
1061
|
-
get hasValue() {
|
|
1062
|
-
return this.hasValue_;
|
|
1063
|
-
}
|
|
1064
|
-
get value() {
|
|
1065
|
-
if (!this.hasValue_) {
|
|
1066
|
-
Debug.unreachable();
|
|
1067
|
-
}
|
|
1068
|
-
return this.value_;
|
|
1069
|
-
}
|
|
1070
|
-
set value(value) {
|
|
1071
|
-
this.value_ = value;
|
|
1072
|
-
this.hasValue_ = true;
|
|
1073
|
-
}
|
|
1074
|
-
};
|
|
1075
|
-
|
|
1076
1056
|
// source/common/Displayable.ts
|
|
1077
1057
|
var DisplayableArray = class {
|
|
1078
1058
|
constructor(array, separator) {
|
|
@@ -8398,74 +8378,51 @@ var Result;
|
|
|
8398
8378
|
Result2.Error = Error2;
|
|
8399
8379
|
})(Result || (Result = {}));
|
|
8400
8380
|
|
|
8401
|
-
// source/common/
|
|
8402
|
-
var
|
|
8403
|
-
|
|
8404
|
-
|
|
8405
|
-
|
|
8406
|
-
|
|
8407
|
-
|
|
8381
|
+
// source/common/TaskController.ts
|
|
8382
|
+
var TaskController = class {
|
|
8383
|
+
constructor(timeSliceMs = 30, cancellationToken) {
|
|
8384
|
+
this.checkCount = 0;
|
|
8385
|
+
this.lastTimeMs = Date.now();
|
|
8386
|
+
this.timeSliceMs = timeSliceMs;
|
|
8387
|
+
this.cancellationToken = cancellationToken;
|
|
8408
8388
|
}
|
|
8409
|
-
|
|
8410
|
-
return
|
|
8389
|
+
shouldYieldOnceOutOf100() {
|
|
8390
|
+
return this.shouldYield(100);
|
|
8411
8391
|
}
|
|
8412
|
-
|
|
8413
|
-
|
|
8414
|
-
|
|
8415
|
-
|
|
8416
|
-
|
|
8417
|
-
|
|
8418
|
-
|
|
8419
|
-
|
|
8420
|
-
|
|
8421
|
-
|
|
8422
|
-
|
|
8423
|
-
|
|
8424
|
-
result = cursor.parent.parent;
|
|
8425
|
-
break whileLoop;
|
|
8426
|
-
case 37 /* VariantTypeDeclarationBody */:
|
|
8427
|
-
result = cursor.parent.parent;
|
|
8428
|
-
break whileLoop;
|
|
8429
|
-
case 38 /* TypeExtensionDeclaration */:
|
|
8430
|
-
result = cursor.parent;
|
|
8431
|
-
break whileLoop;
|
|
8432
|
-
case 42 /* TypeMemberGroupDeclaration */:
|
|
8433
|
-
cursor = cursor.parent.parent.parent;
|
|
8434
|
-
break;
|
|
8435
|
-
default:
|
|
8436
|
-
Debug.never(cursor.parent);
|
|
8392
|
+
shouldYield(onceOutOf = 1) {
|
|
8393
|
+
Debug.assert(onceOutOf > 0);
|
|
8394
|
+
let result = false;
|
|
8395
|
+
if (this.timeSliceMs >= 0) {
|
|
8396
|
+
this.checkCount++;
|
|
8397
|
+
result = this.checkCount % onceOutOf === 0;
|
|
8398
|
+
if (result && this.timeSliceMs > 0) {
|
|
8399
|
+
const timeMs = Date.now();
|
|
8400
|
+
const elapsedTime = timeMs - this.lastTimeMs;
|
|
8401
|
+
result = elapsedTime > this.timeSliceMs;
|
|
8402
|
+
if (result) {
|
|
8403
|
+
this.lastTimeMs = timeMs;
|
|
8437
8404
|
}
|
|
8438
8405
|
}
|
|
8406
|
+
}
|
|
8439
8407
|
return result;
|
|
8440
8408
|
}
|
|
8441
|
-
|
|
8442
|
-
|
|
8443
|
-
whileLoop:
|
|
8444
|
-
while (true) {
|
|
8445
|
-
switch (result.parent.kind) {
|
|
8446
|
-
case 42 /* TypeMemberGroupDeclaration */:
|
|
8447
|
-
result = result.parent.parent.parent;
|
|
8448
|
-
break;
|
|
8449
|
-
case 21 /* AliasTypeDeclarationBody */:
|
|
8450
|
-
case 32 /* StructuredTypeDeclarationBody */:
|
|
8451
|
-
case 37 /* VariantTypeDeclarationBody */:
|
|
8452
|
-
case 38 /* TypeExtensionDeclaration */:
|
|
8453
|
-
break whileLoop;
|
|
8454
|
-
default:
|
|
8455
|
-
Debug.never(result.parent);
|
|
8456
|
-
}
|
|
8457
|
-
}
|
|
8458
|
-
return result;
|
|
8409
|
+
isCancellationRequested() {
|
|
8410
|
+
return this.cancellationToken?.isCancellationRequested === true;
|
|
8459
8411
|
}
|
|
8460
|
-
|
|
8461
|
-
|
|
8462
|
-
|
|
8463
|
-
|
|
8464
|
-
|
|
8465
|
-
return
|
|
8466
|
-
}
|
|
8412
|
+
throwIfCancellationRequested() {
|
|
8413
|
+
this.cancellationToken?.throwIfCancellationRequested();
|
|
8414
|
+
}
|
|
8415
|
+
yieldTask(timeMs) {
|
|
8416
|
+
return __async(this, null, function* () {
|
|
8417
|
+
return new Promise((r) => setTimeout(r, timeMs));
|
|
8418
|
+
});
|
|
8467
8419
|
}
|
|
8468
8420
|
};
|
|
8421
|
+
function yieldTask(timeMs) {
|
|
8422
|
+
return __async(this, null, function* () {
|
|
8423
|
+
return new Promise((r) => setTimeout(r, timeMs));
|
|
8424
|
+
});
|
|
8425
|
+
}
|
|
8469
8426
|
|
|
8470
8427
|
// source/common/TreeTraversal.ts
|
|
8471
8428
|
function traverseTree(root, visitTokens, taskController, nodeVisitor) {
|
|
@@ -8661,76 +8618,6 @@ function setUserLocale(locale) {
|
|
|
8661
8618
|
}
|
|
8662
8619
|
}
|
|
8663
8620
|
|
|
8664
|
-
// source/common/WithDiagnostics.ts
|
|
8665
|
-
var WithDiagnostics_ok = class {
|
|
8666
|
-
constructor(value) {
|
|
8667
|
-
this.value = value;
|
|
8668
|
-
this.kind = "ok";
|
|
8669
|
-
}
|
|
8670
|
-
toNullable() {
|
|
8671
|
-
return this.value;
|
|
8672
|
-
}
|
|
8673
|
-
};
|
|
8674
|
-
var WithDiagnostics_error = class {
|
|
8675
|
-
constructor(diagnostics) {
|
|
8676
|
-
this.kind = "error";
|
|
8677
|
-
if (diagnostics instanceof Array) {
|
|
8678
|
-
this.value = diagnostics;
|
|
8679
|
-
} else {
|
|
8680
|
-
this.value = [diagnostics];
|
|
8681
|
-
}
|
|
8682
|
-
}
|
|
8683
|
-
toNullable() {
|
|
8684
|
-
return void 0;
|
|
8685
|
-
}
|
|
8686
|
-
};
|
|
8687
|
-
|
|
8688
|
-
// source/common/TaskController.ts
|
|
8689
|
-
var TaskController = class {
|
|
8690
|
-
constructor(timeSliceMs = 30, cancellationToken) {
|
|
8691
|
-
this.checkCount = 0;
|
|
8692
|
-
this.lastTimeMs = Date.now();
|
|
8693
|
-
this.timeSliceMs = timeSliceMs;
|
|
8694
|
-
this.cancellationToken = cancellationToken;
|
|
8695
|
-
}
|
|
8696
|
-
shouldYieldOnceOutOf100() {
|
|
8697
|
-
return this.shouldYield(100);
|
|
8698
|
-
}
|
|
8699
|
-
shouldYield(onceOutOf = 1) {
|
|
8700
|
-
Debug.assert(onceOutOf > 0);
|
|
8701
|
-
let result = false;
|
|
8702
|
-
if (this.timeSliceMs >= 0) {
|
|
8703
|
-
this.checkCount++;
|
|
8704
|
-
result = this.checkCount % onceOutOf === 0;
|
|
8705
|
-
if (result && this.timeSliceMs > 0) {
|
|
8706
|
-
const timeMs = Date.now();
|
|
8707
|
-
const elapsedTime = timeMs - this.lastTimeMs;
|
|
8708
|
-
result = elapsedTime > this.timeSliceMs;
|
|
8709
|
-
if (result) {
|
|
8710
|
-
this.lastTimeMs = timeMs;
|
|
8711
|
-
}
|
|
8712
|
-
}
|
|
8713
|
-
}
|
|
8714
|
-
return result;
|
|
8715
|
-
}
|
|
8716
|
-
isCancellationRequested() {
|
|
8717
|
-
return this.cancellationToken?.isCancellationRequested === true;
|
|
8718
|
-
}
|
|
8719
|
-
throwIfCancellationRequested() {
|
|
8720
|
-
this.cancellationToken?.throwIfCancellationRequested();
|
|
8721
|
-
}
|
|
8722
|
-
yieldTask(timeMs) {
|
|
8723
|
-
return __async(this, null, function* () {
|
|
8724
|
-
return new Promise((r) => setTimeout(r, timeMs));
|
|
8725
|
-
});
|
|
8726
|
-
}
|
|
8727
|
-
};
|
|
8728
|
-
function yieldTask(timeMs) {
|
|
8729
|
-
return __async(this, null, function* () {
|
|
8730
|
-
return new Promise((r) => setTimeout(r, timeMs));
|
|
8731
|
-
});
|
|
8732
|
-
}
|
|
8733
|
-
|
|
8734
8621
|
// source/common/Range.ts
|
|
8735
8622
|
var Range = class _Range {
|
|
8736
8623
|
constructor(start, end) {
|
|
@@ -15651,6 +15538,75 @@ var PackageEntityMembers = class _PackageEntityMembers {
|
|
|
15651
15538
|
}
|
|
15652
15539
|
};
|
|
15653
15540
|
|
|
15541
|
+
// source/analysis/TreeQuery.ts
|
|
15542
|
+
var TreeQuery = class {
|
|
15543
|
+
static getSourceFile(node, analyzer) {
|
|
15544
|
+
return analyzer.getProjectSourceFile(node.sourceFile);
|
|
15545
|
+
}
|
|
15546
|
+
static getSourcePackage(node, analyzer) {
|
|
15547
|
+
return this.getSourceFile(node, analyzer).package;
|
|
15548
|
+
}
|
|
15549
|
+
static getPackageEntity(node, analyzer) {
|
|
15550
|
+
return analyzer.entity.ofPackage(this.getSourceFile(node, analyzer).package);
|
|
15551
|
+
}
|
|
15552
|
+
};
|
|
15553
|
+
var TypeMemberQuery = class {
|
|
15554
|
+
static getContainingDeclaration(node) {
|
|
15555
|
+
let result;
|
|
15556
|
+
let cursor = node.parent.parent;
|
|
15557
|
+
whileLoop:
|
|
15558
|
+
while (true) {
|
|
15559
|
+
switch (cursor.parent.kind) {
|
|
15560
|
+
case 21 /* AliasTypeDeclarationBody */:
|
|
15561
|
+
result = cursor.parent.parent;
|
|
15562
|
+
break whileLoop;
|
|
15563
|
+
case 32 /* StructuredTypeDeclarationBody */:
|
|
15564
|
+
result = cursor.parent.parent;
|
|
15565
|
+
break whileLoop;
|
|
15566
|
+
case 37 /* VariantTypeDeclarationBody */:
|
|
15567
|
+
result = cursor.parent.parent;
|
|
15568
|
+
break whileLoop;
|
|
15569
|
+
case 38 /* TypeExtensionDeclaration */:
|
|
15570
|
+
result = cursor.parent;
|
|
15571
|
+
break whileLoop;
|
|
15572
|
+
case 42 /* TypeMemberGroupDeclaration */:
|
|
15573
|
+
cursor = cursor.parent.parent.parent;
|
|
15574
|
+
break;
|
|
15575
|
+
default:
|
|
15576
|
+
Debug.never(cursor.parent);
|
|
15577
|
+
}
|
|
15578
|
+
}
|
|
15579
|
+
return result;
|
|
15580
|
+
}
|
|
15581
|
+
static getOutermostMemberBlock(node) {
|
|
15582
|
+
let result = node.parent.parent;
|
|
15583
|
+
whileLoop:
|
|
15584
|
+
while (true) {
|
|
15585
|
+
switch (result.parent.kind) {
|
|
15586
|
+
case 42 /* TypeMemberGroupDeclaration */:
|
|
15587
|
+
result = result.parent.parent.parent;
|
|
15588
|
+
break;
|
|
15589
|
+
case 21 /* AliasTypeDeclarationBody */:
|
|
15590
|
+
case 32 /* StructuredTypeDeclarationBody */:
|
|
15591
|
+
case 37 /* VariantTypeDeclarationBody */:
|
|
15592
|
+
case 38 /* TypeExtensionDeclaration */:
|
|
15593
|
+
break whileLoop;
|
|
15594
|
+
default:
|
|
15595
|
+
Debug.never(result.parent);
|
|
15596
|
+
}
|
|
15597
|
+
}
|
|
15598
|
+
return result;
|
|
15599
|
+
}
|
|
15600
|
+
static getContextualTypeEntity(node, analyzer) {
|
|
15601
|
+
const containingDeclaration = this.getContainingDeclaration(node);
|
|
15602
|
+
if (containingDeclaration.kind === 38 /* TypeExtensionDeclaration */) {
|
|
15603
|
+
return analyzer.entity.ofTypeExtensionDeclaration(containingDeclaration).getExtendedTypeEntity();
|
|
15604
|
+
} else {
|
|
15605
|
+
return analyzer.entity.ofTypeWithMembersDeclaration(containingDeclaration);
|
|
15606
|
+
}
|
|
15607
|
+
}
|
|
15608
|
+
};
|
|
15609
|
+
|
|
15654
15610
|
// source/project/Compilation.ts
|
|
15655
15611
|
var Compilation = class {
|
|
15656
15612
|
constructor(uri, mainPackage, userPackages, libraryPackages) {
|
|
@@ -39157,6 +39113,30 @@ var TypeNarrower = class _TypeNarrower {
|
|
|
39157
39113
|
}
|
|
39158
39114
|
};
|
|
39159
39115
|
|
|
39116
|
+
// source/diagnostic/WithDiagnostics.ts
|
|
39117
|
+
var WithDiagnostics_ok = class {
|
|
39118
|
+
constructor(value) {
|
|
39119
|
+
this.value = value;
|
|
39120
|
+
this.kind = "ok";
|
|
39121
|
+
}
|
|
39122
|
+
toNullable() {
|
|
39123
|
+
return this.value;
|
|
39124
|
+
}
|
|
39125
|
+
};
|
|
39126
|
+
var WithDiagnostics_error = class {
|
|
39127
|
+
constructor(diagnostics) {
|
|
39128
|
+
this.kind = "error";
|
|
39129
|
+
if (diagnostics instanceof Array) {
|
|
39130
|
+
this.value = diagnostics;
|
|
39131
|
+
} else {
|
|
39132
|
+
this.value = [diagnostics];
|
|
39133
|
+
}
|
|
39134
|
+
}
|
|
39135
|
+
toNullable() {
|
|
39136
|
+
return void 0;
|
|
39137
|
+
}
|
|
39138
|
+
};
|
|
39139
|
+
|
|
39160
39140
|
// source/analysis/UserDefinableBinaryOperatorResolver.ts
|
|
39161
39141
|
var UserDefinableBinaryOperatorResolver = class {
|
|
39162
39142
|
constructor(analyzer, left, right, operatorKind, operatorNodeForDiagnostic) {
|
|
@@ -70727,7 +70707,6 @@ export {
|
|
|
70727
70707
|
RecursiveCachedValueEvaluationError,
|
|
70728
70708
|
CancelledError,
|
|
70729
70709
|
GenericCancellationToken,
|
|
70730
|
-
Delayed,
|
|
70731
70710
|
DisplayableArray,
|
|
70732
70711
|
DisplayableOrPrimitive,
|
|
70733
70712
|
CharacterCodes,
|
|
@@ -70861,18 +70840,14 @@ export {
|
|
|
70861
70840
|
isNonEmptyArray,
|
|
70862
70841
|
Option,
|
|
70863
70842
|
Result,
|
|
70864
|
-
|
|
70865
|
-
|
|
70843
|
+
TaskController,
|
|
70844
|
+
yieldTask,
|
|
70866
70845
|
traverseTree,
|
|
70867
70846
|
TraversalController,
|
|
70868
70847
|
Uri,
|
|
70869
70848
|
UrisRelativityKind,
|
|
70870
70849
|
getUserLocale,
|
|
70871
70850
|
setUserLocale,
|
|
70872
|
-
WithDiagnostics_ok,
|
|
70873
|
-
WithDiagnostics_error,
|
|
70874
|
-
TaskController,
|
|
70875
|
-
yieldTask,
|
|
70876
70851
|
Diagnostic,
|
|
70877
70852
|
DiagnosticLocation,
|
|
70878
70853
|
DiagnosticAcceptorWithArgumentFactory,
|
|
@@ -71004,6 +70979,7 @@ export {
|
|
|
71004
70979
|
IntrinsicParameterEntity,
|
|
71005
70980
|
IntrinsicLocalVariableEntity,
|
|
71006
70981
|
PackageEntityMembers,
|
|
70982
|
+
TreeQuery,
|
|
71007
70983
|
PackageAliasTypeDeclarationEntity,
|
|
71008
70984
|
ConstructorDeclarationEntity,
|
|
71009
70985
|
findModifier,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Compiler
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-W3UL6UED.js";
|
|
4
4
|
import {
|
|
5
5
|
ArtelVersion,
|
|
6
6
|
Cached,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
__async,
|
|
16
16
|
performanceMeasurementStageNames,
|
|
17
17
|
performanceMeasurementStages
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-LLI2DYRX.js";
|
|
19
19
|
|
|
20
20
|
// source/executor/FileSystemUri.ts
|
|
21
21
|
import { platform } from "os";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import ts from 'typescript';
|
|
2
|
-
import { DisplayableOrPrimitive, Name, PackageLocale, Query, Range, TaskController
|
|
2
|
+
import { DisplayableOrPrimitive, Name, PackageLocale, Query, Range, TaskController } from '../common/index.js';
|
|
3
3
|
import { Diagnostic, DiagnosticAcceptor, DiagnosticLocation } from '../diagnostic/Diagnostic.js';
|
|
4
4
|
import { DiagnosticCode } from '../diagnostic/DiagnosticCode.js';
|
|
5
5
|
import { DiagnosticFlags, DiagnosticKind } from '../diagnostic/DiagnosticData.js';
|
|
@@ -38,6 +38,8 @@ import { TypeMemberImplementationCheckResult } from './TypeMemberImplementationC
|
|
|
38
38
|
import * as controlFlow from './control-flow/index.js';
|
|
39
39
|
import { WellKnownDeclarations } from './index.js';
|
|
40
40
|
import * as semanticContext from './semantic-context/index.js';
|
|
41
|
+
import { TypeWithMembersOrTypeExtensionDeclaration } from './TreeQuery.js';
|
|
42
|
+
import { WithDiagnostics } from '../diagnostic/WithDiagnostics.js';
|
|
41
43
|
export declare class Analyzer {
|
|
42
44
|
readonly compilation: project.Compilation;
|
|
43
45
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WithDiagnostics } from '../
|
|
1
|
+
import { WithDiagnostics } from '../diagnostic/WithDiagnostics.js';
|
|
2
2
|
import { BinaryOperatorKind } from '../entities/OperatorKind.js';
|
|
3
3
|
import * as tree from '../tree/index.js';
|
|
4
4
|
import * as types from '../types/index.js';
|
|
@@ -5,7 +5,6 @@ export * from './Cached.js';
|
|
|
5
5
|
export * from './CancellationToken.js';
|
|
6
6
|
export * from './Constants.js';
|
|
7
7
|
export * from './Debug.js';
|
|
8
|
-
export * from './Delayed.js';
|
|
9
8
|
export * from './Displayable.js';
|
|
10
9
|
export * from './FormatString.js';
|
|
11
10
|
export * from './Interner.js';
|
|
@@ -24,9 +23,7 @@ export * from './PerformanceMeasurement.js';
|
|
|
24
23
|
export * from './Query.js';
|
|
25
24
|
export * from './Range.js';
|
|
26
25
|
export * from './Result.js';
|
|
27
|
-
export * from './
|
|
26
|
+
export * from './TaskController.js';
|
|
28
27
|
export * from './TreeTraversal.js';
|
|
29
28
|
export * from './Uri.js';
|
|
30
29
|
export * from './UserLocale.js';
|
|
31
|
-
export * from './WithDiagnostics.js';
|
|
32
|
-
export * from './TaskController.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Diagnostic } from '
|
|
1
|
+
import { Diagnostic } from './Diagnostic.js';
|
|
2
2
|
export type WithDiagnostics<T> = WithDiagnostics_ok<T> | WithDiagnostics_error<T>;
|
|
3
3
|
export declare class WithDiagnostics_ok<T> implements IWithDiagnostics<T> {
|
|
4
4
|
readonly value: T;
|
|
@@ -1,45 +1,18 @@
|
|
|
1
1
|
import * as ls from 'vscode-languageserver';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
* Возвращает `string | null`.
|
|
17
|
-
*/
|
|
18
|
-
provideServerOwnedDocumentContent: string;
|
|
19
|
-
/**
|
|
20
|
-
* Возвращает `EmitCodeToStringResult`.
|
|
21
|
-
*/
|
|
22
|
-
emitCodeToString: string;
|
|
23
|
-
/**
|
|
24
|
-
* Возвращает `string | null`.
|
|
25
|
-
*/
|
|
26
|
-
displayFileSystemTree: string;
|
|
27
|
-
/**
|
|
28
|
-
* Возвращает `void`.
|
|
29
|
-
*/
|
|
30
|
-
createOrUpdateSourceFile: string;
|
|
31
|
-
/**
|
|
32
|
-
* Возвращает `void`.
|
|
33
|
-
*/
|
|
34
|
-
deleteSourceFile: string;
|
|
35
|
-
/**
|
|
36
|
-
* Возвращает `ls.Range | null`.
|
|
37
|
-
*/
|
|
38
|
-
getNodeRange: string;
|
|
39
|
-
/**
|
|
40
|
-
* Возвращает `void`.
|
|
41
|
-
*/
|
|
42
|
-
assignField: string;
|
|
2
|
+
declare class CustomRequestType<P, R> extends ls.RequestType<P, R, void> {
|
|
3
|
+
}
|
|
4
|
+
export declare const customRequests: {
|
|
5
|
+
getLocalesAvailableForTranslation: CustomRequestType<GetLocalesAvailableForTranslationParams, string[] | null>;
|
|
6
|
+
translateSourceFile: CustomRequestType<TranslateSourceFileParams, string | null>;
|
|
7
|
+
provideEvaluatableExpression: CustomRequestType<ProvideEvaluatableExpressionParams, EvaluatableExpression | null>;
|
|
8
|
+
provideServerOwnedDocumentContent: CustomRequestType<ProvideServerOwnedDocumentContentParams, string | null>;
|
|
9
|
+
emitCodeToString: CustomRequestType<EmitCodeToStringParams, EmitCodeToStringResult>;
|
|
10
|
+
displayFileSystemTree: CustomRequestType<DisplayFileSystemTreeParams, string | null>;
|
|
11
|
+
createOrUpdateSourceFile: CustomRequestType<CreateOrUpdateSourceFileParams, void>;
|
|
12
|
+
deleteSourceFile: CustomRequestType<DeleteSourceFileParams, void>;
|
|
13
|
+
getNodeRange: CustomRequestType<GetNodeRangeParams, ls.Range | null>;
|
|
14
|
+
assignField: CustomRequestType<AssignFieldParams, void>;
|
|
15
|
+
deleteBlockFromScript: CustomRequestType<DeleteBlockFromScriptParams, void>;
|
|
43
16
|
};
|
|
44
17
|
export type GetLocalesAvailableForTranslationParams = {
|
|
45
18
|
textDocument: ls.TextDocumentIdentifier;
|
|
@@ -100,7 +73,7 @@ export type AssignFieldParams = {
|
|
|
100
73
|
/**
|
|
101
74
|
* Путь к узлу функции, в котором нужно расположить присваивание.
|
|
102
75
|
*/
|
|
103
|
-
|
|
76
|
+
functionNodeUri: SyntaxNodeUri;
|
|
104
77
|
/**
|
|
105
78
|
* Имя поля.
|
|
106
79
|
*/
|
|
@@ -114,13 +87,9 @@ export type AssignFieldParams = {
|
|
|
114
87
|
/**
|
|
115
88
|
* Путь к синтаксическому узлу, соответствующему месту последнего присваивания значения.
|
|
116
89
|
*/
|
|
117
|
-
|
|
90
|
+
lastAssignmentNodeUri?: SyntaxNodeUri;
|
|
91
|
+
};
|
|
92
|
+
export type DeleteBlockFromScriptParams = {
|
|
93
|
+
functionNodeUri: SyntaxNodeUri;
|
|
118
94
|
};
|
|
119
|
-
export
|
|
120
|
-
export declare function isProvideServerOwnedDocumentContentParams(value: unknown): value is ProvideServerOwnedDocumentContentParams;
|
|
121
|
-
export declare function isEmitCodeToStringParams(value: unknown): value is EmitCodeToStringParams;
|
|
122
|
-
export declare function isDisplayFileSystemTreeParams(value: unknown): value is DisplayFileSystemTreeParams;
|
|
123
|
-
export declare function isCreateOrUpdateSourceFileParams(value: unknown): value is CreateOrUpdateSourceFileParams;
|
|
124
|
-
export declare function isDeleteSourceFileParams(value: unknown): value is DeleteSourceFileParams;
|
|
125
|
-
export declare function isGetNodeRangeParams(value: unknown): value is GetNodeRangeParams;
|
|
126
|
-
export declare function isAssignFieldParams(value: unknown): value is AssignFieldParams;
|
|
95
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SubprogramDeclarationOrLiteral } from '../analysis/NodeTypeUtils.js';
|
|
2
|
+
import { SourceFile } from '../project/index.js';
|
|
3
|
+
import { SourceFileEdit } from './Types.js';
|
|
4
|
+
export declare class DeleteBlockFromScriptService {
|
|
5
|
+
createEditDeletingBlock(sourceFile: SourceFile, subprogramDeclaration: SubprogramDeclarationOrLiteral): SourceFileEdit | undefined;
|
|
6
|
+
}
|
|
@@ -33,6 +33,7 @@ export declare class LanguageServer {
|
|
|
33
33
|
private readonly fileSystemTreeDisplayService;
|
|
34
34
|
private readonly selectionRangeService;
|
|
35
35
|
private readonly assignFieldService;
|
|
36
|
+
private readonly deleteBlockFromScriptService;
|
|
36
37
|
private readonly codeActionsService;
|
|
37
38
|
constructor(config: LanguageServerConfig);
|
|
38
39
|
start(): void;
|
|
@@ -59,8 +60,8 @@ export declare class LanguageServer {
|
|
|
59
60
|
private onHover;
|
|
60
61
|
private convertSourceFileItemKind;
|
|
61
62
|
private convertDiagnostic;
|
|
62
|
-
private onExecuteCommand;
|
|
63
63
|
private onAssignField;
|
|
64
|
+
private onDeleteBlockFromScript;
|
|
64
65
|
private convertSourceFileEdit;
|
|
65
66
|
private convertSourceFileEditsToWorkspaceEdit;
|
|
66
67
|
private onGetNodeRange;
|
|
@@ -68,7 +69,7 @@ export declare class LanguageServer {
|
|
|
68
69
|
private onDeleteSourceFile;
|
|
69
70
|
private onDisplayFileSystemTree;
|
|
70
71
|
private onEmitCodeToString;
|
|
71
|
-
private
|
|
72
|
+
private onProvideServerOwnedDocumentContent;
|
|
72
73
|
private onProvideEvaluatableExpression;
|
|
73
74
|
private onCompletion;
|
|
74
75
|
private onCompletionResolve;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ObservableObject } from 'reactronic';
|
|
2
2
|
import { Analyzer } from '../../analysis/Analyzer.js';
|
|
3
3
|
import { TaskController } from '../../common/index.js';
|
|
4
|
-
import { Entity } from '../../entities/index.js';
|
|
4
|
+
import type { Entity } from '../../entities/index.js';
|
|
5
5
|
import { PackageContent } from '../../project/PackageContent.js';
|
|
6
6
|
import { TypeScriptLibrariesProvider } from '../../ts-interop/TsLibrariesProvider.js';
|
|
7
7
|
import { SourceLocation } from '../Types.js';
|
|
@@ -11,6 +11,8 @@ export declare class SourceGenerationService extends ObservableObject {
|
|
|
11
11
|
private readonly tsLibrariesProvider;
|
|
12
12
|
private readonly standardPackageContentsProviders;
|
|
13
13
|
private readonly generatedPackageStates;
|
|
14
|
+
private packagesToDeleteAfterFileIsClosed;
|
|
15
|
+
private nextId;
|
|
14
16
|
get compilationControllers(): readonly CompilationController[];
|
|
15
17
|
constructor(trackedSourceFiles: ReadonlyClientTrackedSourceFiles, tsLibrariesProvider: TypeScriptLibrariesProvider, standardPackageContentsProviders: (taskController: TaskController) => Promise<readonly PackageContent[] | undefined>);
|
|
16
18
|
getDefinitionInGeneratedCode(analyzer: Analyzer, entity: Entity, taskController: TaskController): Promise<SourceLocation[] | undefined>;
|
|
@@ -19,5 +21,4 @@ export declare class SourceGenerationService extends ObservableObject {
|
|
|
19
21
|
private getOrGeneratePackageSource;
|
|
20
22
|
private createGeneratedPackageConfiguration;
|
|
21
23
|
private checkIfEntityOfKindIsPresentInGeneratedCode;
|
|
22
|
-
private setDeleteGeneratedPackageTimeout;
|
|
23
24
|
}
|
package/package.json
CHANGED
|
File without changes
|