Skip to content

Commit 4b395b6

Browse files
Merge remote-tracking branch 'origin/main' into release-4.6
2 parents 40c4fac + 0655f32 commit 4b395b6

File tree

402 files changed

+15439
-2820
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

402 files changed

+15439
-2820
lines changed

.devcontainer/devcontainer.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@
77
}
88
},
99
"settings": {
10-
"terminal.integrated.shell.linux": "/bin/bash"
10+
"terminal.integrated.defaultProfile.linux": "bash",
11+
"terminal.integrated.profiles.linux": {
12+
"bash": {
13+
"path": "/bin/bash",
14+
"icon": "terminal-bash",
15+
},
16+
},
1117
},
1218
"extensions": [
1319
"dbaeumer.vscode-eslint"

lib/zh-cn/diagnosticMessages.generated.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
"Add_await_to_initializer_for_0_95084": "\"await\" 添加到 \"{0}\" 的初始值设定项",
131131
"Add_await_to_initializers_95089": "\"await\" 添加到初始值设定项",
132132
"Add_braces_to_arrow_function_95059": "向箭头函数添加大括号",
133-
"Add_class_tag_95102": "添加“@”标记",
133+
"Add_class_tag_95102": "添加“@class”标记",
134134
"Add_const_to_all_unresolved_variables_95082": "\"const\" 添加到所有未解析变量",
135135
"Add_const_to_unresolved_variable_95081": "\"const\" 添加到未解析的变量",
136136
"Add_default_import_0_to_existing_import_declaration_from_1_90033": "将默认导入 \"{0}\"\"{1}\" 添加到现有导入声明。",
@@ -154,7 +154,7 @@
154154
"Add_parameter_name_90034": "添加参数名称",
155155
"Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037": "将限定符添加到匹配成员名称的所有未解析变量",
156156
"Add_this_parameter_95104": "添加“此”参数。",
157-
"Add_this_tag_95103": "添加“@”标记",
157+
"Add_this_tag_95103": "添加“@this”标记",
158158
"Add_to_all_uncalled_decorators_95044": "\"()\" 添加到所有未调用的修饰器",
159159
"Add_ts_ignore_to_all_error_messages_95042": "\"@ts-ignore\" 添加到所有错误消息",
160160
"Add_undefined_to_a_type_when_accessed_using_an_index_6674": "使用索引访问时,将 “undefined” 添加到类型。",
@@ -1784,4 +1784,4 @@
17841784
"with_statements_are_not_allowed_in_strict_mode_1101": "严格模式下不允许使用 \"with\" 语句。",
17851785
"yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_t_7057": "\"yield\" 表达式隐式导致 \"any\" 类型,因为它的包含生成器缺少返回类型批注。",
17861786
"yield_expressions_cannot_be_used_in_a_parameter_initializer_2523": "不能在参数初始化表达式中使用 \"yield\" 表达式。"
1787-
}
1787+
}

package-lock.json

+82-72
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/processDiagnosticMessages.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function main(): void {
4141
const outputFilesDir = path.dirname(inputFilePath);
4242
const thisFilePathRel = path.relative(process.cwd(), outputFilesDir);
4343

44-
const infoFileOutput = buildInfoFileOutput(diagnosticMessages, "./diagnosticInformationMap.generated.ts", thisFilePathRel);
44+
const infoFileOutput = buildInfoFileOutput(diagnosticMessages, `./${path.basename(inputFilePath)}`, thisFilePathRel);
4545
checkForUniqueCodes(diagnosticMessages);
4646
writeFile("diagnosticInformationMap.generated.ts", infoFileOutput);
4747

@@ -62,7 +62,7 @@ function checkForUniqueCodes(diagnosticTable: InputDiagnosticMessageTable) {
6262
function buildInfoFileOutput(messageTable: InputDiagnosticMessageTable, inputFilePathRel: string, thisFilePathRel: string): string {
6363
let result =
6464
"// <auto-generated />\r\n" +
65-
"// generated from '" + inputFilePathRel + "' by '" + thisFilePathRel.replace(/\\/g, "/") + "'\r\n" +
65+
"// generated from '" + inputFilePathRel + "' in '" + thisFilePathRel.replace(/\\/g, "/") + "'\r\n" +
6666
"/* @internal */\r\n" +
6767
"namespace ts {\r\n" +
6868
" function diag(code: number, category: DiagnosticCategory, key: string, message: string, reportsUnnecessary?: {}, elidedInCompatabilityPyramid?: boolean, reportsDeprecated?: {}): DiagnosticMessage {\r\n" +

src/compiler/binder.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -174,14 +174,12 @@ namespace ts {
174174
const binder = createBinder();
175175

176176
export function bindSourceFile(file: SourceFile, options: CompilerOptions) {
177-
tracing?.push(tracing.Phase.Bind, "bindSourceFile", { path: file.path }, /*separateBeginAndEnd*/ true);
178177
performance.mark("beforeBind");
179178
perfLogger.logStartBindFile("" + file.fileName);
180179
binder(file, options);
181180
perfLogger.logStopBindFile();
182181
performance.mark("afterBind");
183182
performance.measure("Bind", "beforeBind", "afterBind");
184-
tracing?.pop();
185183
}
186184

187185
function createBinder(): (file: SourceFile, options: CompilerOptions) => void {
@@ -253,7 +251,9 @@ namespace ts {
253251
Debug.attachFlowNodeDebugInfo(reportedUnreachableFlow);
254252

255253
if (!file.locals) {
254+
tracing?.push(tracing.Phase.Bind, "bindSourceFile", { path: file.path }, /*separateBeginAndEnd*/ true);
256255
bind(file);
256+
tracing?.pop();
257257
file.symbolCount = symbolCount;
258258
file.classifiableNames = classifiableNames;
259259
delayedBindJSDocTypedefTag();

0 commit comments

Comments
 (0)