mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
Don't error when 'reserved' names appear in ambient contexts.
Fixes #8293
This commit is contained in:
@@ -1377,7 +1377,8 @@ namespace ts {
|
||||
if (inStrictMode &&
|
||||
node.originalKeywordKind >= SyntaxKind.FirstFutureReservedWord &&
|
||||
node.originalKeywordKind <= SyntaxKind.LastFutureReservedWord &&
|
||||
!isIdentifierName(node)) {
|
||||
!isIdentifierName(node) &&
|
||||
!isInAmbientContext(node)) {
|
||||
|
||||
// Report error only if there are no parse errors in file
|
||||
if (!file.parseDiagnostics.length) {
|
||||
|
||||
Reference in New Issue
Block a user