mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-18 05:43:11 -05:00
Merge branch 'master' into object-spread
This commit is contained in:
@@ -16771,7 +16771,13 @@ namespace ts {
|
||||
}
|
||||
|
||||
checkExpression(node.expression);
|
||||
error(node.expression, Diagnostics.All_symbols_within_a_with_block_will_be_resolved_to_any);
|
||||
|
||||
const sourceFile = getSourceFileOfNode(node);
|
||||
if (!hasParseDiagnostics(sourceFile)) {
|
||||
const start = getSpanOfTokenAtPosition(sourceFile, node.pos).start;
|
||||
const end = node.statement.pos;
|
||||
grammarErrorAtPos(sourceFile, start, end - start, Diagnostics.The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any);
|
||||
}
|
||||
}
|
||||
|
||||
function checkSwitchStatement(node: SwitchStatement) {
|
||||
|
||||
@@ -1279,7 +1279,7 @@
|
||||
"category": "Error",
|
||||
"code": 2409
|
||||
},
|
||||
"All symbols within a 'with' block will be resolved to 'any'.": {
|
||||
"The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'.": {
|
||||
"category": "Error",
|
||||
"code": 2410
|
||||
},
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace ts.Completions {
|
||||
addRange(entries, keywordCompletions);
|
||||
}
|
||||
|
||||
return { isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation || isSourceFileJavaScript(sourceFile), entries };
|
||||
return { isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation, entries };
|
||||
|
||||
function getJavaScriptCompletionEntries(sourceFile: SourceFile, position: number, uniqueNames: Map<string>): CompletionEntry[] {
|
||||
const entries: CompletionEntry[] = [];
|
||||
|
||||
Reference in New Issue
Block a user