diff --git a/lib/lib.d.ts b/lib/lib.d.ts index ee6bab86c75..3c003313c8b 100644 --- a/lib/lib.d.ts +++ b/lib/lib.d.ts @@ -987,7 +987,7 @@ interface JSON { /** * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. * @param value A JavaScript value, usually an object or array, to be converted. - * @param replacer An array of strings and numbers that acts as a white list for selecting the object properties that will be stringified. + * @param replacer An array of strings and numbers that acts as a approved list for selecting the object properties that will be stringified. * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. */ stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string; diff --git a/lib/lib.es5.d.ts b/lib/lib.es5.d.ts index ad657460a3b..e082101411d 100644 --- a/lib/lib.es5.d.ts +++ b/lib/lib.es5.d.ts @@ -987,7 +987,7 @@ interface JSON { /** * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. * @param value A JavaScript value, usually an object or array, to be converted. - * @param replacer An array of strings and numbers that acts as a white list for selecting the object properties that will be stringified. + * @param replacer An array of strings and numbers that acts as a approved list for selecting the object properties that will be stringified. * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. */ stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string; diff --git a/lib/lib.es6.d.ts b/lib/lib.es6.d.ts index e73456308b7..8e9de3f4ec9 100644 --- a/lib/lib.es6.d.ts +++ b/lib/lib.es6.d.ts @@ -987,7 +987,7 @@ interface JSON { /** * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. * @param value A JavaScript value, usually an object or array, to be converted. - * @param replacer An array of strings and numbers that acts as a white list for selecting the object properties that will be stringified. + * @param replacer An array of strings and numbers that acts as a approved list for selecting the object properties that will be stringified. * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. */ stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string; diff --git a/lib/tsc.js b/lib/tsc.js index 78f4fc3884b..0e3d7285ac3 100644 --- a/lib/tsc.js +++ b/lib/tsc.js @@ -7235,7 +7235,8 @@ var ts; } function nextTokenIsClassOrFunctionOrAsync() { nextToken(); - return token === 73 || token === 87 || token === 118; + return token === 73 || token === 87 || + (token === 118 && lookAhead(nextTokenIsFunctionKeywordOnSameLine)); } function isListElement(parsingContext, inErrorRecovery) { var node = currentNode(parsingContext); diff --git a/lib/tsserver.js b/lib/tsserver.js index 1d0fbd864fa..af6ee897902 100644 --- a/lib/tsserver.js +++ b/lib/tsserver.js @@ -8153,7 +8153,8 @@ var ts; } function nextTokenIsClassOrFunctionOrAsync() { nextToken(); - return token === 73 || token === 87 || token === 118; + return token === 73 || token === 87 || + (token === 118 && lookAhead(nextTokenIsFunctionKeywordOnSameLine)); } function isListElement(parsingContext, inErrorRecovery) { var node = currentNode(parsingContext); diff --git a/lib/tsserverlibrary.js b/lib/tsserverlibrary.js index f92b06a1d73..5dafd5528a8 100644 --- a/lib/tsserverlibrary.js +++ b/lib/tsserverlibrary.js @@ -8153,7 +8153,8 @@ var ts; } function nextTokenIsClassOrFunctionOrAsync() { nextToken(); - return token === 73 || token === 87 || token === 118; + return token === 73 || token === 87 || + (token === 118 && lookAhead(nextTokenIsFunctionKeywordOnSameLine)); } function isListElement(parsingContext, inErrorRecovery) { var node = currentNode(parsingContext); diff --git a/lib/typescript.js b/lib/typescript.js index 58376b5ec95..22cbe79129c 100644 --- a/lib/typescript.js +++ b/lib/typescript.js @@ -8988,7 +8988,8 @@ var ts; } function nextTokenIsClassOrFunctionOrAsync() { nextToken(); - return token === 73 /* ClassKeyword */ || token === 87 /* FunctionKeyword */ || token === 118 /* AsyncKeyword */; + return token === 73 /* ClassKeyword */ || token === 87 /* FunctionKeyword */ || + (token === 118 /* AsyncKeyword */ && lookAhead(nextTokenIsFunctionKeywordOnSameLine)); } // True if positioned at the start of a list element function isListElement(parsingContext, inErrorRecovery) { diff --git a/lib/typescriptServices.js b/lib/typescriptServices.js index 58376b5ec95..22cbe79129c 100644 --- a/lib/typescriptServices.js +++ b/lib/typescriptServices.js @@ -8988,7 +8988,8 @@ var ts; } function nextTokenIsClassOrFunctionOrAsync() { nextToken(); - return token === 73 /* ClassKeyword */ || token === 87 /* FunctionKeyword */ || token === 118 /* AsyncKeyword */; + return token === 73 /* ClassKeyword */ || token === 87 /* FunctionKeyword */ || + (token === 118 /* AsyncKeyword */ && lookAhead(nextTokenIsFunctionKeywordOnSameLine)); } // True if positioned at the start of a list element function isListElement(parsingContext, inErrorRecovery) {