Closed linxiaowu66 closed 2 years ago
tsc
is a bin file, you are right, i should use the code below.
spawn.sync(
isVue ? vueTscPath : tscPath,
[
'--rootDir',
rootDir,
'--declaration',
'--emitDeclarationOnly',
'--declarationDir',
outputDir,
],
{
stdio: 'ignore',
},
);
我这边 Mac 验证了没问题,你用的是 Windows、Linux 或者 Mac? Linux 我这边 nvm 安装不了 node v18 版本,验证不了, 理论上 node 运行 bin 文件和直接运行 bin 文件都没有问题才对。 但是如果你那边有问题,运行 bin 没问题的话,改为直接使用 bin 的方式兼容性更好。
node:18.14.0
没有生成声明文件(*.d.ts),
mac iterm zsh
Hi, I use this plugin for generate my .d.ts, but is not work.
Node: v18.4.0
config:
I debug the source code ,found this plugin report error when emit the types file:
this error report from ./bin/tsc shell script.
If I modify this line of code in the emitDeclaration.ts to:
It will be ok.
So this is bug or not ?