CC: @XhmikosR
In Typescript v6...
Trying to simply apply this example in a Typescript file doesn't allow type to be specified cleanly.
For example:
async function extractImportsFromFile(filePath: string): Promise<string[]> {
const content = await readFile(filePath, 'utf-8');
return precinct(content, { type: 'ts' });
}
The compiler gives the following error:

CC: @XhmikosR
In Typescript v6...
Trying to simply apply this example in a Typescript file doesn't allow
typeto be specified cleanly.For example:
The compiler gives the following error: