mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-04-13 18:14:48 -05:00
Allow references to ambient block scoped variables
Even when 1. --out or --outfile is specified 2. The block scoped variable's file is after the referrer's file.
This commit is contained in:
@@ -737,7 +737,8 @@ namespace ts {
|
||||
const useFile = getSourceFileOfNode(usage);
|
||||
if (declarationFile !== useFile) {
|
||||
if ((modulekind && (declarationFile.externalModuleIndicator || useFile.externalModuleIndicator)) ||
|
||||
(!compilerOptions.outFile && !compilerOptions.out)) {
|
||||
(!compilerOptions.outFile && !compilerOptions.out) ||
|
||||
isInAmbientContext(declaration)) {
|
||||
// nodes are in different files and order cannot be determined
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user