@artel/artc 0.6.25247 → 0.6.25249
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 -2
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +1 -1
- package/build/{chunk-3MYTPUJZ.js → chunk-6OPBY3SK.js} +1 -1
- package/build/{chunk-TTNFYVNF.js → chunk-CBYKP5SE.js} +2 -2
- package/build/{chunk-3PVSYUJV.js → chunk-G4UMALLG.js} +102 -77
- package/build/types/analysis/Analyzer.d.ts +8 -2
- package/build/types/common/HelperPhrases.d.ts +2 -1
- package/build/types/diagnostic/DiagnosticCode.d.ts +9 -11
- 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-CBYKP5SE.js";
|
5
|
+
import "./chunk-6OPBY3SK.js";
|
6
6
|
import {
|
7
7
|
__async
|
8
|
-
} from "./chunk-
|
8
|
+
} from "./chunk-G4UMALLG.js";
|
9
9
|
|
10
10
|
// source/Cli.ts
|
11
11
|
function main() {
|
package/build/api/Api.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import {
|
2
2
|
Compiler
|
3
|
-
} from "../chunk-
|
3
|
+
} from "../chunk-6OPBY3SK.js";
|
4
4
|
import {
|
5
5
|
AccessKind,
|
6
6
|
AccessedFunctionValueParameter,
|
@@ -332,7 +332,7 @@ import {
|
|
332
332
|
withoutQuotes,
|
333
333
|
withoutTemplateQuotes,
|
334
334
|
yieldExecution
|
335
|
-
} from "../chunk-
|
335
|
+
} from "../chunk-G4UMALLG.js";
|
336
336
|
export {
|
337
337
|
AccessKind,
|
338
338
|
AccessedFunctionValueParameter,
|
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-CBYKP5SE.js";
|
10
|
+
import "../chunk-6OPBY3SK.js";
|
11
|
+
import "../chunk-G4UMALLG.js";
|
12
12
|
export {
|
13
13
|
CommandLineCompiler,
|
14
14
|
FileSystemUri,
|
package/build/api/ApiServices.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import {
|
2
2
|
Compiler
|
3
|
-
} from "./chunk-
|
3
|
+
} from "./chunk-6OPBY3SK.js";
|
4
4
|
import {
|
5
5
|
ArtelVersion,
|
6
6
|
Cached,
|
@@ -14,7 +14,7 @@ import {
|
|
14
14
|
__async,
|
15
15
|
performanceMeasurementStageNames,
|
16
16
|
performanceMeasurementStages
|
17
|
-
} from "./chunk-
|
17
|
+
} from "./chunk-G4UMALLG.js";
|
18
18
|
|
19
19
|
// source/executor/FileSystemUri.ts
|
20
20
|
import { platform } from "os";
|
@@ -620,7 +620,7 @@ var UniqueWithComparatorQuery = class extends Query {
|
|
620
620
|
};
|
621
621
|
|
622
622
|
// source/common/Constants.ts
|
623
|
-
var ArtelVersion = true ? "0.6.
|
623
|
+
var ArtelVersion = true ? "0.6.25249" : "";
|
624
624
|
var ArtelSourceFileExtensions = [".\u0430\u0440\u0442", ".\u0430\u0440\u0442\u0435\u043B\u044C", ".art", ".artel"];
|
625
625
|
var ArtelSourceFileExtensionSet = new Set(ArtelSourceFileExtensions);
|
626
626
|
var ArtelSourceAndConfigurationFileExtensionSet = new Set(ArtelSourceFileExtensionSet).add(".json");
|
@@ -2403,7 +2403,8 @@ var russianHelperPhrases = {
|
|
2403
2403
|
[5 /* PackageNameSegment */]: "\u0447\u0430\u0441\u0442\u044C \u0438\u043C\u0435\u043D\u0438 \u043F\u0430\u043A\u0435\u0442\u0430",
|
2404
2404
|
[6 /* Variable */]: "\u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u0430\u044F",
|
2405
2405
|
[7 /* Overloads */]: "\u043F\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043A\u0438",
|
2406
|
-
[8 /* EnumeratorMethodName */]: "\u043F\u0435\u0440\u0435\u0431\u043E\u0440"
|
2406
|
+
[8 /* EnumeratorMethodName */]: "\u043F\u0435\u0440\u0435\u0431\u043E\u0440",
|
2407
|
+
[9 /* InvokeMethodName */]: "\u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u044C"
|
2407
2408
|
};
|
2408
2409
|
var englishHelperPhrases = {
|
2409
2410
|
[0 /* Unresolved */]: "unresolved",
|
@@ -2414,7 +2415,8 @@ var englishHelperPhrases = {
|
|
2414
2415
|
[5 /* PackageNameSegment */]: "package name segment",
|
2415
2416
|
[6 /* Variable */]: "variable",
|
2416
2417
|
[7 /* Overloads */]: "overloads",
|
2417
|
-
[8 /* EnumeratorMethodName */]: "enumerator"
|
2418
|
+
[8 /* EnumeratorMethodName */]: "enumerator",
|
2419
|
+
[9 /* InvokeMethodName */]: "invoke"
|
2418
2420
|
};
|
2419
2421
|
var helperPhrases = {
|
2420
2422
|
[1 /* Ru */]: russianHelperPhrases,
|
@@ -3395,7 +3397,9 @@ function parseBinaryInteger(text) {
|
|
3395
3397
|
function withoutQuotes(text) {
|
3396
3398
|
let start = 0;
|
3397
3399
|
let end = text.length;
|
3398
|
-
if (text.startsWith('"')
|
3400
|
+
if (text.startsWith('~"')) {
|
3401
|
+
start += 2;
|
3402
|
+
} else if (text.startsWith('"') || text.startsWith("'")) {
|
3399
3403
|
start += 1;
|
3400
3404
|
}
|
3401
3405
|
if (text.endsWith('"') || text.endsWith("'")) {
|
@@ -3406,7 +3410,9 @@ function withoutQuotes(text) {
|
|
3406
3410
|
function withoutTemplateQuotes(text) {
|
3407
3411
|
let start = 0;
|
3408
3412
|
let end = text.length;
|
3409
|
-
if (text.startsWith('"')
|
3413
|
+
if (text.startsWith('~"')) {
|
3414
|
+
start += 2;
|
3415
|
+
} else if (text.startsWith('"') || text.startsWith("{") || text.startsWith("}")) {
|
3410
3416
|
start += 1;
|
3411
3417
|
}
|
3412
3418
|
if (text.endsWith('"') || text.endsWith("{") || text.endsWith("}")) {
|
@@ -12940,17 +12946,15 @@ var DiagnosticCode = /* @__PURE__ */ ((DiagnosticCode2) => {
|
|
12940
12946
|
DiagnosticCode2[DiagnosticCode2["TheFollowingBaseTypeMembersConflictBecauseTheyHaveTheSameOriginalName0AndMustBeOverridden1"] = 353] = "TheFollowingBaseTypeMembersConflictBecauseTheyHaveTheSameOriginalName0AndMustBeOverridden1";
|
12941
12947
|
DiagnosticCode2[DiagnosticCode2["EitherIdentifiersOrIntegerIndexesAreAllowedAsParametersOfTextTemplateLiteral"] = 354] = "EitherIdentifiersOrIntegerIndexesAreAllowedAsParametersOfTextTemplateLiteral";
|
12942
12948
|
DiagnosticCode2[DiagnosticCode2["OnlyIndex0IsAllowedHereAsParameterOfTextTemplateLiteral"] = 355] = "OnlyIndex0IsAllowedHereAsParameterOfTextTemplateLiteral";
|
12943
|
-
DiagnosticCode2[DiagnosticCode2["
|
12944
|
-
DiagnosticCode2[DiagnosticCode2["
|
12945
|
-
DiagnosticCode2[DiagnosticCode2["
|
12946
|
-
DiagnosticCode2[DiagnosticCode2["
|
12947
|
-
DiagnosticCode2[DiagnosticCode2["
|
12948
|
-
DiagnosticCode2[DiagnosticCode2["
|
12949
|
-
DiagnosticCode2[DiagnosticCode2["
|
12950
|
-
DiagnosticCode2[DiagnosticCode2["
|
12951
|
-
DiagnosticCode2[DiagnosticCode2["
|
12952
|
-
DiagnosticCode2[DiagnosticCode2["ExpressionOfType0CanNotBeUsedInForLoopBecauseNotEnumerableAndNoMethod1"] = 365] = "ExpressionOfType0CanNotBeUsedInForLoopBecauseNotEnumerableAndNoMethod1";
|
12953
|
-
DiagnosticCode2[DiagnosticCode2["ForExpressionToBeUsedInForLoopMethod0MustReturnEnumeratorType"] = 366] = "ForExpressionToBeUsedInForLoopMethod0MustReturnEnumeratorType";
|
12949
|
+
DiagnosticCode2[DiagnosticCode2["TheFirstStatementOfConstructorBlockMustBeEitherBaseOrOwnConstructorCall"] = 356] = "TheFirstStatementOfConstructorBlockMustBeEitherBaseOrOwnConstructorCall";
|
12950
|
+
DiagnosticCode2[DiagnosticCode2["ThisCallCausesOwnConstructorCallCycle"] = 357] = "ThisCallCausesOwnConstructorCallCycle";
|
12951
|
+
DiagnosticCode2[DiagnosticCode2["OwnConstructorCallMustBeTheFirstStatementOfConstructorBlock"] = 358] = "OwnConstructorCallMustBeTheFirstStatementOfConstructorBlock";
|
12952
|
+
DiagnosticCode2[DiagnosticCode2["BaseConstructorCallMustBeTheFirstStatementOfConstructorBlock"] = 359] = "BaseConstructorCallMustBeTheFirstStatementOfConstructorBlock";
|
12953
|
+
DiagnosticCode2[DiagnosticCode2["Field0HasNoInitializerAndMayNotBeAssignedInConstructor"] = 360] = "Field0HasNoInitializerAndMayNotBeAssignedInConstructor";
|
12954
|
+
DiagnosticCode2[DiagnosticCode2["Field0HasNoInitializerAndMayNotBeAssignedInPackageConstructor"] = 361] = "Field0HasNoInitializerAndMayNotBeAssignedInPackageConstructor";
|
12955
|
+
DiagnosticCode2[DiagnosticCode2["Variable0HasNoInitializerAndMayNotBeAssignedInPackageConstructor"] = 362] = "Variable0HasNoInitializerAndMayNotBeAssignedInPackageConstructor";
|
12956
|
+
DiagnosticCode2[DiagnosticCode2["ExpressionOfType0CanNotBeUsedInForLoopBecauseNotEnumerableAndNoMethod1"] = 363] = "ExpressionOfType0CanNotBeUsedInForLoopBecauseNotEnumerableAndNoMethod1";
|
12957
|
+
DiagnosticCode2[DiagnosticCode2["ForExpressionToBeUsedInForLoopMethod0MustReturnEnumeratorType"] = 364] = "ForExpressionToBeUsedInForLoopMethod0MustReturnEnumeratorType";
|
12954
12958
|
DiagnosticCode2[DiagnosticCode2["CannotFindTsLibDirectoryBaseSearchPaths0"] = 401] = "CannotFindTsLibDirectoryBaseSearchPaths0";
|
12955
12959
|
DiagnosticCode2[DiagnosticCode2["SourceFile0IsNotPartOfThePackageAndWontBeLoaded"] = 402] = "SourceFile0IsNotPartOfThePackageAndWontBeLoaded";
|
12956
12960
|
DiagnosticCode2[DiagnosticCode2["ProgramWithoutMainPackageCannotBeCompiled"] = 403] = "ProgramWithoutMainPackageCannotBeCompiled";
|
@@ -13199,17 +13203,15 @@ var englishErrorMessages = {
|
|
13199
13203
|
[353 /* TheFollowingBaseTypeMembersConflictBecauseTheyHaveTheSameOriginalName0AndMustBeOverridden1 */]: "The following base type members conflict because they have the same original name '{0}' and must be overridden:\n{1}",
|
13200
13204
|
[354 /* EitherIdentifiersOrIntegerIndexesAreAllowedAsParametersOfTextTemplateLiteral */]: "Either identifiers or integer indexes are allowed as parameters of text template literal.",
|
13201
13205
|
[355 /* OnlyIndex0IsAllowedHereAsParameterOfTextTemplateLiteral */]: "Only index {0} is allowed here as parameter of text template literal.",
|
13202
|
-
[356 /*
|
13203
|
-
[357 /*
|
13204
|
-
[358 /*
|
13205
|
-
[359 /*
|
13206
|
-
[360 /*
|
13207
|
-
[361 /*
|
13208
|
-
[362 /*
|
13209
|
-
[363 /*
|
13210
|
-
[364 /*
|
13211
|
-
[365 /* ExpressionOfType0CanNotBeUsedInForLoopBecauseNotEnumerableAndNoMethod1 */]: "Expression of type '{0}' cannot be used in a for loop because the type does not implement the 'Enumerable' aspect and does not contain a method named '{1}' that returns the 'Enumerator' type.",
|
13212
|
-
[366 /* ForExpressionToBeUsedInForLoopMethod0MustReturnEnumeratorType */]: "For an expression to be used in a for loop, method '{0}' must return the 'Enumerator' type.",
|
13206
|
+
[356 /* TheFirstStatementOfConstructorBlockMustBeEitherBaseOrOwnConstructorCall */]: "The first statement of constructor block must be either base or own constructor call.",
|
13207
|
+
[357 /* ThisCallCausesOwnConstructorCallCycle */]: "This call causes own constructor call cycle.",
|
13208
|
+
[358 /* OwnConstructorCallMustBeTheFirstStatementOfConstructorBlock */]: "Own constructor call must be the first statement of constructor block.",
|
13209
|
+
[359 /* BaseConstructorCallMustBeTheFirstStatementOfConstructorBlock */]: "Base constructor call must be the first statement of constructor block.",
|
13210
|
+
[360 /* Field0HasNoInitializerAndMayNotBeAssignedInConstructor */]: "Field '{0}' has no initializer and may not be assigned in constructor.",
|
13211
|
+
[361 /* Field0HasNoInitializerAndMayNotBeAssignedInPackageConstructor */]: "Field '{0}' has no initializer and may not be assigned in package constructor.",
|
13212
|
+
[362 /* Variable0HasNoInitializerAndMayNotBeAssignedInPackageConstructor */]: "Variable '{0}' has no initializer and may not be assigned in package constructor.",
|
13213
|
+
[363 /* ExpressionOfType0CanNotBeUsedInForLoopBecauseNotEnumerableAndNoMethod1 */]: "Expression of type '{0}' cannot be used in a for loop because the type does not implement the 'Enumerable' aspect and does not contain a method named '{1}' that returns the 'Enumerator' type.",
|
13214
|
+
[364 /* ForExpressionToBeUsedInForLoopMethod0MustReturnEnumeratorType */]: "For an expression to be used in a for loop, method '{0}' must return the 'Enumerator' type.",
|
13213
13215
|
[401 /* CannotFindTsLibDirectoryBaseSearchPaths0 */]: "Can not find directory with TypeScript library. Base search paths: {0}.",
|
13214
13216
|
[402 /* SourceFile0IsNotPartOfThePackageAndWontBeLoaded */]: "Source file '{0}' is not part of the package and won't be loaded.",
|
13215
13217
|
[403 /* ProgramWithoutMainPackageCannotBeCompiled */]: "Program without main package cannot be compiled.",
|
@@ -13411,17 +13413,15 @@ var russianErrorMessages = {
|
|
13411
13413
|
[353 /* TheFollowingBaseTypeMembersConflictBecauseTheyHaveTheSameOriginalName0AndMustBeOverridden1 */]: "\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0435 \u0447\u043B\u0435\u043D\u044B \u0431\u0430\u0437\u043E\u0432\u044B\u0445 \u0442\u0438\u043F\u043E\u0432 \u043A\u043E\u043D\u0444\u043B\u0438\u043A\u0442\u0443\u044E\u0442 \u043C\u0435\u0436\u0434\u0443 \u0441\u043E\u0431\u043E\u0439, \u043F\u043E\u0442\u043E\u043C\u0443 \u0447\u0442\u043E \u0438\u0445 \u0438\u043C\u0435\u043D\u0430 '{0}' \u0441\u043E\u0432\u043F\u0430\u0434\u0430\u044E\u0442 \u043D\u0430 \u044F\u0437\u044B\u043A\u0435 \u043E\u0440\u0438\u0433\u0438\u043D\u0430\u043B\u0430, \u0438 \u0434\u043E\u043B\u0436\u043D\u044B \u0431\u044B\u0442\u044C \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u044B:\n{1}",
|
13412
13414
|
[354 /* EitherIdentifiersOrIntegerIndexesAreAllowedAsParametersOfTextTemplateLiteral */]: "\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430\u043C\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0430 \u0442\u0435\u043A\u0441\u0442\u0430 \u043C\u043E\u0433\u0443\u0442 \u0431\u044B\u0442\u044C \u043B\u0438\u0431\u043E \u0438\u043C\u0435\u043D\u0430, \u043B\u0438\u0431\u043E \u0446\u0435\u043B\u043E\u0447\u0438\u0441\u043B\u0435\u043D\u043D\u044B\u0435 \u0438\u043D\u0434\u0435\u043A\u0441\u044B.",
|
13413
13415
|
[355 /* OnlyIndex0IsAllowedHereAsParameterOfTextTemplateLiteral */]: "\u0417\u0434\u0435\u0441\u044C \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u043E\u043C \u0448\u0430\u0431\u043B\u043E\u043D\u0430 \u0442\u0435\u043A\u0441\u0442\u0430 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u0442\u043E\u043B\u044C\u043A\u043E \u0446\u0435\u043B\u043E\u0447\u0438\u0441\u043B\u0435\u043D\u043D\u044B\u0439 \u0438\u043D\u0434\u0435\u043A\u0441 {0}.",
|
13414
|
-
[356 /*
|
13415
|
-
[357 /*
|
13416
|
-
[358 /*
|
13417
|
-
[359 /*
|
13418
|
-
[360 /*
|
13419
|
-
[361 /*
|
13420
|
-
[362 /*
|
13421
|
-
[363 /*
|
13422
|
-
[364 /*
|
13423
|
-
[365 /* ExpressionOfType0CanNotBeUsedInForLoopBecauseNotEnumerableAndNoMethod1 */]: "\u0412\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0442\u0438\u043F\u0430 '{0}' \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C\u0441\u044F \u0432 \u0446\u0438\u043A\u043B\u0435 '\u0434\u043B\u044F', \u043F\u043E\u0441\u043A\u043E\u043B\u044C\u043A\u0443 \u0435\u0433\u043E \u0442\u0438\u043F \u043D\u0435 \u0440\u0435\u0430\u043B\u0438\u0437\u0443\u0435\u0442 \u0430\u0441\u043F\u0435\u043A\u0442 '\u041F\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0435\u043C\u044B\u0439' \u0438 \u043D\u0435 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u0442 \u043C\u0435\u0442\u043E\u0434 \u0441 \u0438\u043C\u0435\u043D\u0435\u043C '{1}', \u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u044E\u0449\u0438\u0439 \u0442\u0438\u043F '\u041F\u0435\u0440\u0435\u0431\u043E\u0440'.",
|
13424
|
-
[366 /* ForExpressionToBeUsedInForLoopMethod0MustReturnEnumeratorType */]: "\u0427\u0442\u043E\u0431\u044B \u0432\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u043C\u043E\u0436\u043D\u043E \u0431\u044B\u043B\u043E \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0432 \u0446\u0438\u043A\u043B\u0435 '\u0434\u043B\u044F', \u043C\u0435\u0442\u043E\u0434 '{0}' \u0434\u043E\u043B\u0436\u0435\u043D \u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044C \u0442\u0438\u043F '\u041F\u0435\u0440\u0435\u0431\u043E\u0440'.",
|
13416
|
+
[356 /* TheFirstStatementOfConstructorBlockMustBeEitherBaseOrOwnConstructorCall */]: "\u041F\u0435\u0440\u0432\u043E\u0439 \u043A\u043E\u043C\u0430\u043D\u0434\u043E\u0439 \u0431\u043B\u043E\u043A\u0430 \u043A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440\u0430 \u0434\u043E\u043B\u0436\u043D\u0430 \u0431\u044B\u0442\u044C \u043A\u043E\u043C\u0430\u043D\u0434\u0430 \u0432\u044B\u0437\u043E\u0432\u0430 \u0441\u043E\u0431\u0441\u0442\u0432\u0435\u043D\u043D\u043E\u0433\u043E \u0438\u043B\u0438 \u0431\u0430\u0437\u043E\u0432\u043E\u0433\u043E \u043A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440\u0430.",
|
13417
|
+
[357 /* ThisCallCausesOwnConstructorCallCycle */]: "\u0414\u0430\u043D\u043D\u044B\u0439 \u0432\u044B\u0437\u043E\u0432 \u043F\u0440\u0438\u0432\u043E\u0434\u0438\u0442 \u043A \u0446\u0438\u043A\u043B\u0443 \u0432\u044B\u0437\u043E\u0432\u0430 \u0441\u043E\u0431\u0441\u0442\u0432\u0435\u043D\u043D\u044B\u0445 \u043A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440\u043E\u0432.",
|
13418
|
+
[358 /* OwnConstructorCallMustBeTheFirstStatementOfConstructorBlock */]: "\u0412\u044B\u0437\u043E\u0432 \u0441\u043E\u0431\u0441\u0442\u0432\u0435\u043D\u043D\u043E\u0433\u043E \u043A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440\u0430 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0439 \u043A\u043E\u043C\u0430\u043D\u0434\u043E\u0439 \u0431\u043B\u043E\u043A\u0430 \u043A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440\u0430.",
|
13419
|
+
[359 /* BaseConstructorCallMustBeTheFirstStatementOfConstructorBlock */]: "\u0412\u044B\u0437\u043E\u0432 \u0431\u0430\u0437\u043E\u0432\u043E\u0433\u043E \u043A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440\u0430 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0439 \u043A\u043E\u043C\u0430\u043D\u0434\u043E\u0439 \u0431\u043B\u043E\u043A\u0430 \u043A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440\u0430.",
|
13420
|
+
[360 /* Field0HasNoInitializerAndMayNotBeAssignedInConstructor */]: "\u041F\u043E\u043B\u0435 '{0}' \u043D\u0435 \u0438\u043C\u0435\u0435\u0442 \u043D\u0430\u0447\u0430\u043B\u044C\u043D\u043E\u0433\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u0438 \u0435\u043C\u0443 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u043D\u0435 \u043F\u0440\u0438\u0441\u0432\u043E\u0435\u043D\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 \u043A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440\u0435.",
|
13421
|
+
[361 /* Field0HasNoInitializerAndMayNotBeAssignedInPackageConstructor */]: "\u041F\u043E\u043B\u0435 '{0}' \u043D\u0435 \u0438\u043C\u0435\u0435\u0442 \u043D\u0430\u0447\u0430\u043B\u044C\u043D\u043E\u0433\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u0438 \u0435\u043C\u0443 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u043D\u0435 \u043F\u0440\u0438\u0441\u0432\u043E\u0435\u043D\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 \u043A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440\u0435 \u043F\u0430\u043A\u0435\u0442\u0430.",
|
13422
|
+
[362 /* Variable0HasNoInitializerAndMayNotBeAssignedInPackageConstructor */]: "\u041F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u0430\u044F '{0}' \u043D\u0435 \u0438\u043C\u0435\u0435\u0442 \u043D\u0430\u0447\u0430\u043B\u044C\u043D\u043E\u0433\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u0438 \u0435\u0439 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u043D\u0435 \u043F\u0440\u0438\u0441\u0432\u043E\u0435\u043D\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 \u043A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440\u0435 \u043F\u0430\u043A\u0435\u0442\u0430.",
|
13423
|
+
[363 /* ExpressionOfType0CanNotBeUsedInForLoopBecauseNotEnumerableAndNoMethod1 */]: "\u0412\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0442\u0438\u043F\u0430 '{0}' \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C\u0441\u044F \u0432 \u0446\u0438\u043A\u043B\u0435 '\u0434\u043B\u044F', \u043F\u043E\u0441\u043A\u043E\u043B\u044C\u043A\u0443 \u0435\u0433\u043E \u0442\u0438\u043F \u043D\u0435 \u0440\u0435\u0430\u043B\u0438\u0437\u0443\u0435\u0442 \u0430\u0441\u043F\u0435\u043A\u0442 '\u041F\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0435\u043C\u044B\u0439' \u0438 \u043D\u0435 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u0442 \u043C\u0435\u0442\u043E\u0434 \u0441 \u0438\u043C\u0435\u043D\u0435\u043C '{1}', \u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u044E\u0449\u0438\u0439 \u0442\u0438\u043F '\u041F\u0435\u0440\u0435\u0431\u043E\u0440'.",
|
13424
|
+
[364 /* ForExpressionToBeUsedInForLoopMethod0MustReturnEnumeratorType */]: "\u0427\u0442\u043E\u0431\u044B \u0432\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u043C\u043E\u0436\u043D\u043E \u0431\u044B\u043B\u043E \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0432 \u0446\u0438\u043A\u043B\u0435 '\u0434\u043B\u044F', \u043C\u0435\u0442\u043E\u0434 '{0}' \u0434\u043E\u043B\u0436\u0435\u043D \u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044C \u0442\u0438\u043F '\u041F\u0435\u0440\u0435\u0431\u043E\u0440'.",
|
13425
13425
|
[401 /* CannotFindTsLibDirectoryBaseSearchPaths0 */]: "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043D\u0430\u0439\u0442\u0438 \u043F\u0430\u043F\u043A\u0443 \u0441\u043E \u0441\u0442\u0430\u043D\u0434\u0430\u0440\u0442\u043D\u043E\u0439 \u0431\u0438\u0431\u043B\u0438\u043E\u0442\u0435\u043A\u043E\u0439 TypeScript. \u041F\u0443\u0442\u0438, \u043E\u0442\u043D\u043E\u0441\u0438\u0442\u0435\u043B\u044C\u043D\u043E \u043A\u043E\u0442\u043E\u0440\u044B\u0445 \u043E\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043B\u044F\u043B\u0441\u044F \u043F\u043E\u0438\u0441\u043A: {0}.",
|
13426
13426
|
[402 /* SourceFile0IsNotPartOfThePackageAndWontBeLoaded */]: "\u0418\u0441\u0445\u043E\u0434\u043D\u044B\u0439 \u0444\u0430\u0439\u043B '{0}' \u043D\u0435 \u044F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u0447\u0430\u0441\u0442\u044C\u044E \u043F\u0430\u043A\u0435\u0442\u0430 \u0438 \u043D\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D.",
|
13427
13427
|
[403 /* ProgramWithoutMainPackageCannotBeCompiled */]: "\u041F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u0430 \u0431\u0435\u0437 \u0433\u043B\u0430\u0432\u043D\u043E\u0433\u043E \u043F\u0430\u043A\u0435\u0442\u0430 \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u0441\u043A\u043E\u043C\u043F\u0438\u043B\u0438\u0440\u043E\u0432\u0430\u043D\u0430.",
|
@@ -19804,14 +19804,7 @@ var ExpressionParser = class {
|
|
19804
19804
|
}
|
19805
19805
|
case 27 /* Dot */: {
|
19806
19806
|
const dotToken = this.parser.parseExpectedToken(27 /* Dot */);
|
19807
|
-
|
19808
|
-
const runKeyword = this.parser.parseOptionalKeyword(7 /* Run */);
|
19809
|
-
if (runKeyword !== void 0) {
|
19810
|
-
Debug.assert(runKeyword.tokens.length === 1);
|
19811
|
-
memberName = runKeyword.tokens[0];
|
19812
|
-
} else {
|
19813
|
-
memberName = this.parser.parseIdentifier();
|
19814
|
-
}
|
19807
|
+
const memberName = this.parser.parseIdentifier();
|
19815
19808
|
expression = this.parser.intern(
|
19816
19809
|
new MemberAccessExpression2(expression, dotToken, memberName),
|
19817
19810
|
expressionStart
|
@@ -23906,7 +23899,11 @@ var TsTypeMembersCreator = class {
|
|
23906
23899
|
if (this._symbolsToForceStatic !== void 0) {
|
23907
23900
|
createMembers(this._symbolsToForceStatic, true);
|
23908
23901
|
}
|
23909
|
-
|
23902
|
+
const enumeratorMethodName = LocalizationHelper.localizeHelperPhrase(
|
23903
|
+
8 /* EnumeratorMethodName */,
|
23904
|
+
this._typeEntity.getLocalization().locale
|
23905
|
+
);
|
23906
|
+
if (this._typeSymbolDeclarations !== void 0 && this.getNamedMembersFromTypeToMergeWith(enumeratorMethodName) === void 0) {
|
23910
23907
|
const enumeratorMethod = this.createEnumeratorMethodIfIteratorMethodExists(this._typeSymbolDeclarations);
|
23911
23908
|
if (enumeratorMethod !== void 0) {
|
23912
23909
|
namedMembersFromSymbols.push(enumeratorMethod);
|
@@ -25296,7 +25293,11 @@ var TsIteratorFunctionEntity = class {
|
|
25296
25293
|
this._overriddenMembers = new Cached();
|
25297
25294
|
}
|
25298
25295
|
getName() {
|
25299
|
-
|
25296
|
+
const locale = this.getLocalization().locale;
|
25297
|
+
return this._tsctx.getName(
|
25298
|
+
LocalizationHelper.localizeHelperPhrase(8 /* EnumeratorMethodName */, locale),
|
25299
|
+
"method"
|
25300
|
+
);
|
25300
25301
|
}
|
25301
25302
|
getTypeParameters() {
|
25302
25303
|
return [];
|
@@ -35438,7 +35439,7 @@ var Resolver3 = class {
|
|
35438
35439
|
if (!(node.parent.kind === 104 /* ExpressionStatement */ && node.parent.parent.parent.kind === 92 /* FunctionBlock */ && node.parent.parent.elements[0] === node.parent)) {
|
35439
35440
|
diagnostics ??= [];
|
35440
35441
|
diagnostics.push(this._analyzer.createNodeDiagnostic(
|
35441
|
-
|
35442
|
+
359 /* BaseConstructorCallMustBeTheFirstStatementOfConstructorBlock */,
|
35442
35443
|
this._node
|
35443
35444
|
));
|
35444
35445
|
}
|
@@ -37674,7 +37675,7 @@ var Resolver10 = class {
|
|
37674
37675
|
if (!(node.parent.kind === 104 /* ExpressionStatement */ && node.parent.parent.parent.kind === 92 /* FunctionBlock */ && node.parent.parent.elements[0] === node.parent)) {
|
37675
37676
|
diagnostics ??= [];
|
37676
37677
|
diagnostics.push(this._analyzer.createNodeDiagnostic(
|
37677
|
-
|
37678
|
+
358 /* OwnConstructorCallMustBeTheFirstStatementOfConstructorBlock */,
|
37678
37679
|
this._node
|
37679
37680
|
));
|
37680
37681
|
}
|
@@ -37823,7 +37824,7 @@ var OwnAndBaseConstructorCallsChecker = class {
|
|
37823
37824
|
baseConstructorCalls.set(entity, baseConstructorWithoutParameters);
|
37824
37825
|
} else if (baseTypeHasAccessibleConstructors) {
|
37825
37826
|
diagnostics.push(this._analyzer.createNodeDiagnostic(
|
37826
|
-
|
37827
|
+
356 /* TheFirstStatementOfConstructorBlockMustBeEitherBaseOrOwnConstructorCall */,
|
37827
37828
|
constructorDeclaration.creationKeyword
|
37828
37829
|
));
|
37829
37830
|
}
|
@@ -37834,7 +37835,7 @@ var OwnAndBaseConstructorCallsChecker = class {
|
|
37834
37835
|
addOwnConstructorCallOrReportCycleDiagnostic(constructorContainingCall, calledConstructor, ownConstructorCalls, nodeForDiagnostic, diagnostics) {
|
37835
37836
|
if (calledConstructor.getOriginalEntity() === constructorContainingCall.getOriginalEntity()) {
|
37836
37837
|
diagnostics.push(this._analyzer.createNodeDiagnostic(
|
37837
|
-
|
37838
|
+
357 /* ThisCallCausesOwnConstructorCallCycle */,
|
37838
37839
|
nodeForDiagnostic
|
37839
37840
|
));
|
37840
37841
|
} else {
|
@@ -37845,7 +37846,7 @@ var OwnAndBaseConstructorCallsChecker = class {
|
|
37845
37846
|
break;
|
37846
37847
|
} else if (current === constructorContainingCall) {
|
37847
37848
|
diagnostics.push(this._analyzer.createNodeDiagnostic(
|
37848
|
-
|
37849
|
+
357 /* ThisCallCausesOwnConstructorCallCycle */,
|
37849
37850
|
nodeForDiagnostic
|
37850
37851
|
));
|
37851
37852
|
break;
|
@@ -39150,7 +39151,7 @@ var PackageAndStaticVariablesInitializationValidator = class {
|
|
39150
39151
|
reportNotInitialedVariableDiagnostic(entity) {
|
39151
39152
|
const location = this.getVariableDiagnosticLocationWithFallback(entity);
|
39152
39153
|
if (location !== void 0) {
|
39153
|
-
const code = entity.subkind === "package" ?
|
39154
|
+
const code = entity.subkind === "package" ? 362 /* Variable0HasNoInitializerAndMayNotBeAssignedInPackageConstructor */ : 361 /* Field0HasNoInitializerAndMayNotBeAssignedInPackageConstructor */;
|
39154
39155
|
const argumentFactory = this._analyzer.createDiagnosticArgumentFactoryWithinPackage(
|
39155
39156
|
getPackageContainingEntity(entity)
|
39156
39157
|
);
|
@@ -42897,7 +42898,7 @@ var ParametersOfFunctionTypeSemanticContext = class extends SemanticContextValid
|
|
42897
42898
|
};
|
42898
42899
|
|
42899
42900
|
// source/analysis/Analyzer.ts
|
42900
|
-
var
|
42901
|
+
var Analyzer12 = class {
|
42901
42902
|
constructor(compilation, tsInteropInputs) {
|
42902
42903
|
this._tsInterop = new Cached();
|
42903
42904
|
this._memberAccessExpressionResolutionResults = /* @__PURE__ */ new Map();
|
@@ -42965,12 +42966,6 @@ var Analyzer = class _Analyzer {
|
|
42965
42966
|
this.originalStandardTypes = new StandardTypes(this, this.originalWellKnownDeclarations);
|
42966
42967
|
this._localizedStandardTypes.set(1 /* Ru */, this.originalStandardTypes);
|
42967
42968
|
}
|
42968
|
-
static {
|
42969
|
-
this.enumeratorMethodName = "\u043F\u0435\u0440\u0435\u0431\u043E\u0440";
|
42970
|
-
}
|
42971
|
-
static {
|
42972
|
-
this.functionTypeInvokeMethodName = "\u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u044C";
|
42973
|
-
}
|
42974
42969
|
get tsInterop() {
|
42975
42970
|
return this._tsInterop.getOrInsertWith(() => this.createTsInterop());
|
42976
42971
|
}
|
@@ -43013,7 +43008,7 @@ var Analyzer = class _Analyzer {
|
|
43013
43008
|
if (member?.kind !== "method") {
|
43014
43009
|
const diagnosticArgumentFactory = semanticContext.getDiagnosticArgumentFactory();
|
43015
43010
|
const diagnostic = this.createNodeDiagnostic(
|
43016
|
-
|
43011
|
+
363 /* ExpressionOfType0CanNotBeUsedInForLoopBecauseNotEnumerableAndNoMethod1 */,
|
43017
43012
|
node,
|
43018
43013
|
[diagnosticArgumentFactory.createDisplayableType(type), enumeratorMethodName]
|
43019
43014
|
);
|
@@ -43026,7 +43021,7 @@ var Analyzer = class _Analyzer {
|
|
43026
43021
|
} else {
|
43027
43022
|
const diagnosticArgumentFactory = semanticContext.getDiagnosticArgumentFactory();
|
43028
43023
|
const diagnostic = this.createNodeDiagnostic(
|
43029
|
-
|
43024
|
+
364 /* ForExpressionToBeUsedInForLoopMethod0MustReturnEnumeratorType */,
|
43030
43025
|
node,
|
43031
43026
|
[diagnosticArgumentFactory.createDisplayableTypeMember(member)]
|
43032
43027
|
);
|
@@ -43748,7 +43743,10 @@ var Analyzer = class _Analyzer {
|
|
43748
43743
|
return Query.from(this.compilation.allPackages).mapAndFilter((p) => p.kind === "translation" ? this.getAnalyzedTranslationPackageIfTargetResolved(p) : void 0).toArray();
|
43749
43744
|
}
|
43750
43745
|
createFunctionTypeInvokeMethod(entity) {
|
43751
|
-
const name = new Name(
|
43746
|
+
const name = new Name(LocalizationHelper.localizeHelperPhrase(
|
43747
|
+
9 /* InvokeMethodName */,
|
43748
|
+
entity.getLocalization().locale
|
43749
|
+
));
|
43752
43750
|
const valueParameters = entity.getValueParameters();
|
43753
43751
|
const returnType = entity.getReturnType();
|
43754
43752
|
const method = new IntrinsicMethodEntity(
|
@@ -44121,9 +44119,11 @@ var Analyzer = class _Analyzer {
|
|
44121
44119
|
return __async(this, null, function* () {
|
44122
44120
|
let result = this._packageAndStaticVariablesInitializationDiagnostics.get(pkg);
|
44123
44121
|
if (result === void 0) {
|
44124
|
-
const usageCountResults =
|
44125
|
-
|
44126
|
-
|
44122
|
+
const usageCountResults = new Array();
|
44123
|
+
for (const sourceFile of pkg.sourceFiles) {
|
44124
|
+
const usageCountResult = yield this.getDeclarationsUsageCount(sourceFile.getSyntaxNode(), cancellationToken);
|
44125
|
+
usageCountResults.push(usageCountResult);
|
44126
|
+
}
|
44127
44127
|
const diagnostics = new AccumulatingDiagnosticAcceptor();
|
44128
44128
|
const validator = new PackageAndStaticVariablesInitializationValidator(this, pkg, usageCountResults, diagnostics);
|
44129
44129
|
validator.validate();
|
@@ -44921,7 +44921,7 @@ var Type = class {
|
|
44921
44921
|
case 74 /* ConditionalExpression */:
|
44922
44922
|
return this.ofConditionalExpression(node, targetTypeHint);
|
44923
44923
|
case 79 /* TextTemplateLiteral */:
|
44924
|
-
return this.ofTextTemplateLiteral(node);
|
44924
|
+
return this.ofTextTemplateLiteral(node, targetTypeHint);
|
44925
44925
|
case 86 /* IdentifierExpression */:
|
44926
44926
|
return this.ofIdentifierExpression(node, targetTypeHint);
|
44927
44927
|
case 82 /* TokenExpression */:
|
@@ -45244,8 +45244,33 @@ var Type = class {
|
|
45244
45244
|
}
|
45245
45245
|
return this._analyzer.typeFactory.getUnionType([firstExpressionType, secondExpressionType], true);
|
45246
45246
|
}
|
45247
|
-
|
45248
|
-
|
45247
|
+
/**
|
45248
|
+
* По умолчанию литерал шаблона текста имеет тип Текст.
|
45249
|
+
*
|
45250
|
+
* Литерал шаблона текста имеет тип ШаблонТекста в следующих случаях:
|
45251
|
+
* - если он присваивается в переменную, имеющую тип ШаблонТекста;
|
45252
|
+
* - если он присваивается в переменную, имеющую союзный тип, содержащий тип ШаблонТекста
|
45253
|
+
* и не содержащий тип Текст.
|
45254
|
+
*/
|
45255
|
+
ofTextTemplateLiteral(node, targetTypeHint) {
|
45256
|
+
const standardTypes = this._analyzer.getLocalizedStandardTypes(
|
45257
|
+
TreeQuery.fromNode(node).locale(this._analyzer)
|
45258
|
+
);
|
45259
|
+
let targetType = this._analyzer.getTargetTypeOfExpression(node, targetTypeHint);
|
45260
|
+
if (targetType !== void 0) {
|
45261
|
+
targetType = unaliasType(targetType);
|
45262
|
+
}
|
45263
|
+
let nodeIsTemplateNotText;
|
45264
|
+
if (targetType === void 0) {
|
45265
|
+
nodeIsTemplateNotText = false;
|
45266
|
+
} else if (targetType.equals(standardTypes.textTemplate)) {
|
45267
|
+
nodeIsTemplateNotText = true;
|
45268
|
+
} else if (targetType.kind === "union") {
|
45269
|
+
nodeIsTemplateNotText = targetType.unaliasedFlattenedTypes.some((t) => t.equals(standardTypes.textTemplate)) && !targetType.unaliasedFlattenedTypes.some((t) => t.equals(standardTypes.text));
|
45270
|
+
} else {
|
45271
|
+
nodeIsTemplateNotText = false;
|
45272
|
+
}
|
45273
|
+
return nodeIsTemplateNotText ? standardTypes.textTemplate : standardTypes.text;
|
45249
45274
|
}
|
45250
45275
|
ofIdentifierExpression(node, targetTypeHint) {
|
45251
45276
|
const meaning = this._analyzer.resolveIdentifierExpression(node, targetTypeHint).meaning;
|
@@ -48898,7 +48923,7 @@ var InstanceFieldsInitializationValidator = class {
|
|
48898
48923
|
const diagnosticArgumentFactory = this.semanticContext.getDiagnosticArgumentFactory();
|
48899
48924
|
for (const field of fields) {
|
48900
48925
|
const data = DiagnosticData.withCode(
|
48901
|
-
|
48926
|
+
360 /* Field0HasNoInitializerAndMayNotBeAssignedInConstructor */,
|
48902
48927
|
[diagnosticArgumentFactory.createDisplayableEntity(field)]
|
48903
48928
|
);
|
48904
48929
|
const location = this.getFieldDiagnosticLocationWithFallback(field);
|
@@ -48935,7 +48960,7 @@ var InstanceFieldsInitializationValidator = class {
|
|
48935
48960
|
for (const field of fields) {
|
48936
48961
|
if (!initializedFields.has(field.getOriginalEntity())) {
|
48937
48962
|
const data = DiagnosticData.withCode(
|
48938
|
-
|
48963
|
+
360 /* Field0HasNoInitializerAndMayNotBeAssignedInConstructor */,
|
48939
48964
|
[diagnosticArgumentFactory.createDisplayableEntity(field)]
|
48940
48965
|
);
|
48941
48966
|
const location = this.getFieldDiagnosticLocationWithFallback(field);
|
@@ -48962,7 +48987,7 @@ var InstanceFieldsInitializationValidator = class {
|
|
48962
48987
|
const assignmentChecker = new AssignmentChecker(this._analyzer, reference, controlFlowNodeEndingConstructor);
|
48963
48988
|
if (!assignmentChecker.checkVariableIsAssigned()) {
|
48964
48989
|
this._diagnostics.addDiagnostic(this._analyzer.createNodeDiagnostic(
|
48965
|
-
|
48990
|
+
360 /* Field0HasNoInitializerAndMayNotBeAssignedInConstructor */,
|
48966
48991
|
node.creationKeyword,
|
48967
48992
|
[diagnosticArgumentFactory.createDisplayableEntity(field)]
|
48968
48993
|
));
|
@@ -65238,13 +65263,13 @@ var IrBuilder = class {
|
|
65238
65263
|
}
|
65239
65264
|
applyImplicitConversionIfRequired(expression, expressionIr) {
|
65240
65265
|
if (this.expressionCanBeImplicitlyConverted(expression)) {
|
65266
|
+
if (expression.kind === 79 /* TextTemplateLiteral */ && this._analyzer.type.ofExpression(expression).equals(this._analyzer.originalStandardTypes.text)) {
|
65267
|
+
return this.convertTextTemplateToText(expressionIr);
|
65268
|
+
}
|
65241
65269
|
let targetType = this._analyzer.getTargetTypeOfExpression(expression);
|
65242
65270
|
if (targetType !== void 0) {
|
65243
65271
|
targetType = unaliasType(this._analyzer.excludeNoneFromType(targetType));
|
65244
65272
|
}
|
65245
|
-
if (expression.kind === 79 /* TextTemplateLiteral */ && targetType === void 0) {
|
65246
|
-
return this.convertTextTemplateToText(expressionIr);
|
65247
|
-
}
|
65248
65273
|
if (targetType !== void 0) {
|
65249
65274
|
const expressionType = this._analyzer.type.ofExpression(expression);
|
65250
65275
|
if (expressionType.equals(this._analyzer.originalStandardTypes.textTemplate)) {
|
@@ -69104,7 +69129,7 @@ export {
|
|
69104
69129
|
SourceFileMembers,
|
69105
69130
|
TargetTypeHint,
|
69106
69131
|
semantic_context_exports,
|
69107
|
-
Analyzer,
|
69132
|
+
Analyzer12 as Analyzer,
|
69108
69133
|
TsInteropInputs,
|
69109
69134
|
SyntacticAccessKind,
|
69110
69135
|
ExpressionCanBeUsedInForLoopCheckResult,
|
@@ -43,8 +43,6 @@ import * as controlFlow from './control-flow/index.js';
|
|
43
43
|
import { WellKnownDeclarations } from './index.js';
|
44
44
|
import * as semanticContext from './semantic-context/index.js';
|
45
45
|
export declare class Analyzer {
|
46
|
-
static readonly enumeratorMethodName = "\u043F\u0435\u0440\u0435\u0431\u043E\u0440";
|
47
|
-
static readonly functionTypeInvokeMethodName = "\u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u044C";
|
48
46
|
readonly compilation: project.Compilation;
|
49
47
|
/**
|
50
48
|
* Пакет с именем 'Артель', содержащий стандартные типы.
|
@@ -372,6 +370,14 @@ declare class Type {
|
|
372
370
|
private ofReferenceExpression;
|
373
371
|
private ofDereferenceExpression;
|
374
372
|
private ofConditionalExpression;
|
373
|
+
/**
|
374
|
+
* По умолчанию литерал шаблона текста имеет тип Текст.
|
375
|
+
*
|
376
|
+
* Литерал шаблона текста имеет тип ШаблонТекста в следующих случаях:
|
377
|
+
* - если он присваивается в переменную, имеющую тип ШаблонТекста;
|
378
|
+
* - если он присваивается в переменную, имеющую союзный тип, содержащий тип ШаблонТекста
|
379
|
+
* и не содержащий тип Текст.
|
380
|
+
*/
|
375
381
|
private ofTextTemplateLiteral;
|
376
382
|
private ofIdentifierExpression;
|
377
383
|
private ofTokenExpression;
|
@@ -8,6 +8,7 @@ export declare const enum HelperPhraseKind {
|
|
8
8
|
PackageNameSegment = 5,
|
9
9
|
Variable = 6,
|
10
10
|
Overloads = 7,
|
11
|
-
EnumeratorMethodName = 8
|
11
|
+
EnumeratorMethodName = 8,
|
12
|
+
InvokeMethodName = 9
|
12
13
|
}
|
13
14
|
export declare function getHelperPhrase(kind: HelperPhraseKind, locale: PackageLocale): string;
|
@@ -192,17 +192,15 @@ export declare enum DiagnosticCode {
|
|
192
192
|
TheFollowingBaseTypeMembersConflictBecauseTheyHaveTheSameOriginalName0AndMustBeOverridden1 = 353,
|
193
193
|
EitherIdentifiersOrIntegerIndexesAreAllowedAsParametersOfTextTemplateLiteral = 354,
|
194
194
|
OnlyIndex0IsAllowedHereAsParameterOfTextTemplateLiteral = 355,
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
ExpressionOfType0CanNotBeUsedInForLoopBecauseNotEnumerableAndNoMethod1 = 365,
|
205
|
-
ForExpressionToBeUsedInForLoopMethod0MustReturnEnumeratorType = 366,
|
195
|
+
TheFirstStatementOfConstructorBlockMustBeEitherBaseOrOwnConstructorCall = 356,
|
196
|
+
ThisCallCausesOwnConstructorCallCycle = 357,
|
197
|
+
OwnConstructorCallMustBeTheFirstStatementOfConstructorBlock = 358,
|
198
|
+
BaseConstructorCallMustBeTheFirstStatementOfConstructorBlock = 359,
|
199
|
+
Field0HasNoInitializerAndMayNotBeAssignedInConstructor = 360,
|
200
|
+
Field0HasNoInitializerAndMayNotBeAssignedInPackageConstructor = 361,
|
201
|
+
Variable0HasNoInitializerAndMayNotBeAssignedInPackageConstructor = 362,
|
202
|
+
ExpressionOfType0CanNotBeUsedInForLoopBecauseNotEnumerableAndNoMethod1 = 363,
|
203
|
+
ForExpressionToBeUsedInForLoopMethod0MustReturnEnumeratorType = 364,
|
206
204
|
CannotFindTsLibDirectoryBaseSearchPaths0 = 401,
|
207
205
|
SourceFile0IsNotPartOfThePackageAndWontBeLoaded = 402,
|
208
206
|
ProgramWithoutMainPackageCannotBeCompiled = 403,
|