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 compilerOptions.types #311

Closed
jupl opened this issue Oct 17, 2016 · 6 comments
Closed

Support for compilerOptions.types #311

jupl opened this issue Oct 17, 2016 · 6 comments
Labels
help wanted Contributions are especially encouraged

Comments

@jupl
Copy link

jupl commented Oct 17, 2016

Given this tsconfig.json:

{
  "compilerOptions": {
    "jsx": "react",
    "moduleResolution": "node",
    "noFallthroughCasesInSwitch": true,
    "noImplicitAny": true,
    "noImplicitReturns": true,
    "noImplicitThis": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "sourceMap": true,
    "strictNullChecks": true,
    "target": "es2015",
    "types": [
      "jest",
      "node"
    ]
  }
}

TypeDoc fails to run with the following error:

Error: Unknown option `types.0`.
Error: Unknown option `types.1`.
@aciccarello
Copy link
Collaborator

This is a remaining issue from #234. A PR for this would be great. Also related is #305 (supporting typeroots)

@Radagaisus
Copy link

A quick patch is to add typeRoots and types to the ignored compiler options. Though, for better support of future TypeScript versions, and an easier upgrade path, it’s best to switch to a whitelist.

Radagaisus added a commit to Radagaisus/typedoc that referenced this issue Oct 18, 2016
…ons.

Added 'types' and 'typeRoots' to the list of strings ignored by
TypeScriptSource. This means TypeDoc will ignore these compiler
settings. This is a quick patch for TypeStrong#305 and TypeStrong#311
@aciccarello
Copy link
Collaborator

Does anyone know if this was fixed in #359?

@jupl
Copy link
Author

jupl commented Jan 29, 2017

@aciccarello The specific error does not show as of the latest version in NPM but errors are being thrown when trying to compile docs such that it appears that the types option is being completely ignored by Typedoc.

@jiayihu
Copy link
Contributor

jiayihu commented Feb 15, 2017

I can confirm that types option is ignored and I can't compile docs

@aciccarello aciccarello added the help wanted Contributions are especially encouraged label Feb 15, 2017
nicknisi added a commit to nicknisi/typedoc that referenced this issue Mar 15, 2017
* Remove restriction on what compilerOptions can be set
* remove filtering of TS 2.2 compilerOptions
* add support for 'list' option types
* Switch to processed compilerOptions
* add support for `compilerOptions.lib`

This PR removes the restrictions on setting options that aren't explicitly setup as options to allow new compilerOptions
to pass through TypeDoc to TypeScript. It also sets up support for 'list' parameter types, and switches to use the
processed compilerOptions, rather than `raw` so that the `lib` properties are properly parsed.

This should fix TypeStrong#315 and I believe TypeStrong#311.
nicknisi added a commit to nicknisi/typedoc that referenced this issue Mar 15, 2017
* Remove restriction on what compilerOptions can be set
* remove filtering of TS 2.2 compilerOptions
* add support for 'list' option types
* Switch to processed compilerOptions
* add support for `compilerOptions.lib`

This PR removes the restrictions on setting options that aren't explicitly setup as options to allow new compilerOptions
to pass through TypeDoc to TypeScript. It also sets up support for 'list' parameter types, and switches to use the
processed compilerOptions, rather than `raw` so that the `lib` properties are properly parsed.

This should fix TypeStrong#315 and I believe TypeStrong#311.
nicknisi added a commit to nicknisi/typedoc that referenced this issue Mar 22, 2017
* Remove restriction on what compilerOptions can be set
* remove filtering of TS 2.2 compilerOptions
* add support for 'list' option types
* Switch to processed compilerOptions
* add support for `compilerOptions.lib`

This PR removes the restrictions on setting options that aren't explicitly setup as options to allow new compilerOptions
to pass through TypeDoc to TypeScript. It also sets up support for 'list' parameter types, and switches to use the
processed compilerOptions, rather than `raw` so that the `lib` properties are properly parsed.

This should fix TypeStrong#315 and I believe TypeStrong#311.
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Jan 17, 2020

This appears to have been fixed with #449

@Gerrit0 Gerrit0 closed this as completed Jan 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Contributions are especially encouraged
Projects
None yet
Development

No branches or pull requests

5 participants