Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for multiple tsconfig.json #1246

Closed
1 task done
HexMox opened this issue Mar 25, 2020 · 2 comments
Closed
1 task done

Support for multiple tsconfig.json #1246

HexMox opened this issue Mar 25, 2020 · 2 comments
Labels
enhancement Improved functionality

Comments

@HexMox
Copy link

HexMox commented Mar 25, 2020

Problem

Hi, great jobs! I would like to build multiple folders with multiple tsconfig.json into one doc.

Currently I merged two tsconfig.json to build, But it goes some type errors.

// tsconfig.web.js
{
  "compilerOptions": {
    "lib": ["esnext", "DOM"],
    // node_modules/@types/node is for node
    // src/types/globals.d.ts for web
    "typeRoots": ["node_modules/@types", "src/types"]
  },
  // ...
}
// src/types/globals.d.ts
// declare process for webpack DefinePlugin
declare const process: any;

and then

Using TypeScript 3.7.5 from /Users/moxhe/workspace/projects/core/src/edu_modules/ke-common/node_modules/typescript/lib
Error: /Users/xxx/globals.d.ts(14)
 Cannot redeclare block-scoped variable 'process'.

Suggested Solution

Poor English, feel free to correct.

@Gerrit0 Gerrit0 added the enhancement Improved functionality label Mar 30, 2020
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Mar 30, 2020

This would be really tricky to implement. I don't plan on tackling it anytime soon. Personally I think separate packages should get separate documentation anyways.

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Dec 27, 2020

This isn't exactly the same thing - but it meets the same need. In 0.20 you can set up a tsconfig which uses project references to reference your other two tsconfig files. TypeDoc will then create two programs. There is no way currently for type references to reach across programs, but they can be bundled in the same docs. See #1414.

@Gerrit0 Gerrit0 closed this as completed Dec 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improved functionality
Projects
None yet
Development

No branches or pull requests

2 participants