Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into release-4.6
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielRosenwasser committed Feb 11, 2022
2 parents 40c4fac + 0655f32 commit 4b395b6
Show file tree
Hide file tree
Showing 402 changed files with 15,439 additions and 2,820 deletions.
8 changes: 7 additions & 1 deletion .devcontainer/devcontainer.json
Expand Up @@ -7,7 +7,13 @@
}
},
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
"terminal.integrated.defaultProfile.linux": "bash",
"terminal.integrated.profiles.linux": {
"bash": {
"path": "/bin/bash",
"icon": "terminal-bash",
},
},
},
"extensions": [
"dbaeumer.vscode-eslint"
Expand Down
6 changes: 3 additions & 3 deletions lib/zh-cn/diagnosticMessages.generated.json
Expand Up @@ -130,7 +130,7 @@
"Add_await_to_initializer_for_0_95084": "\"await\" 添加到 \"{0}\" 的初始值设定项",
"Add_await_to_initializers_95089": "\"await\" 添加到初始值设定项",
"Add_braces_to_arrow_function_95059": "向箭头函数添加大括号",
"Add_class_tag_95102": "添加“@”标记",
"Add_class_tag_95102": "添加“@class”标记",
"Add_const_to_all_unresolved_variables_95082": "\"const\" 添加到所有未解析变量",
"Add_const_to_unresolved_variable_95081": "\"const\" 添加到未解析的变量",
"Add_default_import_0_to_existing_import_declaration_from_1_90033": "将默认导入 \"{0}\"\"{1}\" 添加到现有导入声明。",
Expand All @@ -154,7 +154,7 @@
"Add_parameter_name_90034": "添加参数名称",
"Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037": "将限定符添加到匹配成员名称的所有未解析变量",
"Add_this_parameter_95104": "添加“此”参数。",
"Add_this_tag_95103": "添加“@”标记",
"Add_this_tag_95103": "添加“@this”标记",
"Add_to_all_uncalled_decorators_95044": "\"()\" 添加到所有未调用的修饰器",
"Add_ts_ignore_to_all_error_messages_95042": "\"@ts-ignore\" 添加到所有错误消息",
"Add_undefined_to_a_type_when_accessed_using_an_index_6674": "使用索引访问时,将 “undefined” 添加到类型。",
Expand Down Expand Up @@ -1784,4 +1784,4 @@
"with_statements_are_not_allowed_in_strict_mode_1101": "严格模式下不允许使用 \"with\" 语句。",
"yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_t_7057": "\"yield\" 表达式隐式导致 \"any\" 类型,因为它的包含生成器缺少返回类型批注。",
"yield_expressions_cannot_be_used_in_a_parameter_initializer_2523": "不能在参数初始化表达式中使用 \"yield\" 表达式。"
}
}
154 changes: 82 additions & 72 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions scripts/processDiagnosticMessages.ts
Expand Up @@ -41,7 +41,7 @@ function main(): void {
const outputFilesDir = path.dirname(inputFilePath);
const thisFilePathRel = path.relative(process.cwd(), outputFilesDir);

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

Expand All @@ -62,7 +62,7 @@ function checkForUniqueCodes(diagnosticTable: InputDiagnosticMessageTable) {
function buildInfoFileOutput(messageTable: InputDiagnosticMessageTable, inputFilePathRel: string, thisFilePathRel: string): string {
let result =
"// <auto-generated />\r\n" +
"// generated from '" + inputFilePathRel + "' by '" + thisFilePathRel.replace(/\\/g, "/") + "'\r\n" +
"// generated from '" + inputFilePathRel + "' in '" + thisFilePathRel.replace(/\\/g, "/") + "'\r\n" +
"/* @internal */\r\n" +
"namespace ts {\r\n" +
" function diag(code: number, category: DiagnosticCategory, key: string, message: string, reportsUnnecessary?: {}, elidedInCompatabilityPyramid?: boolean, reportsDeprecated?: {}): DiagnosticMessage {\r\n" +
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/binder.ts
Expand Up @@ -174,14 +174,12 @@ namespace ts {
const binder = createBinder();

export function bindSourceFile(file: SourceFile, options: CompilerOptions) {
tracing?.push(tracing.Phase.Bind, "bindSourceFile", { path: file.path }, /*separateBeginAndEnd*/ true);
performance.mark("beforeBind");
perfLogger.logStartBindFile("" + file.fileName);
binder(file, options);
perfLogger.logStopBindFile();
performance.mark("afterBind");
performance.measure("Bind", "beforeBind", "afterBind");
tracing?.pop();
}

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

if (!file.locals) {
tracing?.push(tracing.Phase.Bind, "bindSourceFile", { path: file.path }, /*separateBeginAndEnd*/ true);
bind(file);
tracing?.pop();
file.symbolCount = symbolCount;
file.classifiableNames = classifiableNames;
delayedBindJSDocTypedefTag();
Expand Down

0 comments on commit 4b395b6

Please sign in to comment.