ts-importer
ts-importer copied to clipboard
Importing "this" instead of the export name.
I can't exactly figure out why this might be happening, but I have a specific export at the end of a file that sets up a logger that looks like this:
const defaultLogger = getLogger("default") as Logger;
export { defaultLogger as logger }
Typescript Importer indexes this export as "this" instead of logger. So, usually on accident I get an import statement at the top of my file that looks like this:
import { this } from "relative/path/to/logger/file";
This is what the symbol index file looks like for this export:
"this": [
{
"name": "this",
"path": "path\\to\\logger.ts",
"isDefault": false
}
]
It's super annoying, since 'this' is used all the time. Any idea why this would be happening?
Thanks, Tyler Robinson
I will take a look into it, until i have found a fix for this, you can add this file to the excluded files (tsimporter.filesToExclude)