ts
- PASS: TS1259: Module '"path"' can only be default-imported using the 'esModuleInterop' flag
- ✅ tsc not work,
tsc -b --clean
not work too - ☑️ TS4023 error of using (Database) name from external module (pass)
PASS: TS1259: Module '"path"' can only be default-imported using the 'esModuleInterop' flag
In my tsconfig.json
file, there is already one flag of esModuleInterop
set to be true.
However, this error still arises up when I use tsc
.
✅ tsc not work, tsc -b --clean
not work too
- The most important key causing this problem(indeed: a 假象) is
outDir
, since when it is set, all the compiled files would go to there, thus gives us an illusion that nothing happened. - Besides, since tsc is possible to create many files, the IDE would not show there in time, you should use
reload
on the target output directory if necessary. - When using
tsc -b --clean
, it also concerns with theoutDir
, and only have effects on this, the one difference is that the command would delete files, but except directories, so an empty directories construct would be shown.
☑️ TS4023 error of using (Database) name from external module (pass)
I am pretty a newbie to typescript so I wonder what does this error mean and how to solve it?
I tried to modify source code of better-sqlite3
, and it works -- the error goes.
Although both circumstances would have no effect on the codes run, I do wanna run with no compile warning or errors.
And even // @ts-ignore
can not suppress this...
If the only solution is to modify the source code of better-sqlite3
, please do it!
And if in case I missed something, or do things not right, please correct me!
Much thanks!