-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issue
Milestone
Description
TypeScript Version: 3.8.3
Search Terms:
preProcessFile, type only import, ambientExternalModules
Code
import ts from "typescript";
const text = `import type { Func } from "./subdir/types.ts";
const func: Func = t => t;
`;
console.log(ts.preProcessFile(text, true));
Expected behavior:
That the type only import would be referenced somehow. As of TypeScript 3.8, ambientExternalModules
was introduced, so I can only assume that is where it should go, but it isn't populated. In addition, ambientExternalModules
is of type string[]
unlike the other properties which are FileReference[]
.
Actual behavior:
{
referencedFiles: [],
typeReferenceDirectives: [],
libReferenceDirectives: [],
importedFiles: [],
isLibFile: false,
ambientExternalModules: undefined
}
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issue