Skip to content

How to generate d.ts files in the same directory as the compiled js files instead of generating them separately in a separate folder #550

Answered by Timeless0911
NexxLuo asked this question in Q&A
Discussion options

You must be logged in to vote

You should add compilerOptions.rootDir and include field to tsconfig.json. It is equivalent to npx tsc --outDir lib --declarati on.

{
  "extends": "../../tsconfig.json",
  "compilerOptions": {
+   "rootDir": "src",
    "isolatedModules": true,
    "declaration": true
  },
+ "include": ["src"]
}

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@NexxLuo
Comment options

@Timeless0911
Comment options

Answer selected by NexxLuo
@NexxLuo
Comment options

@Timeless0911
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants