We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9964800 commit 461808eCopy full SHA for 461808e
cli.js
@@ -2,6 +2,7 @@
2
3
const path = require('path');
4
const fs = require('fs');
5
+const os = require("os");
6
const ts = require('typescript');
7
8
const getArg = (argName) => {
@@ -82,7 +83,9 @@ try {
82
83
fs.writeFileSync(outFile, typing);
84
85
// if we are writing to the node_modules/@types directory, add a package.json file
- if (outputDir.includes('node_modules/@types')) {
86
+ if (outputDir.includes( os.platform() === "win32"
87
+ ? "node_modules\\@types"
88
+ : "node_modules/@types")) {
89
const packageJsonPath = path.resolve(outputDir, 'package.json');
90
91
if (!fs.existsSync(packageJsonPath)) {
0 commit comments