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 TypeScript 4.7 #1935

Closed
sile opened this issue May 25, 2022 · 2 comments · Fixed by #1943
Closed

Support for TypeScript 4.7 #1935

sile opened this issue May 25, 2022 · 2 comments · Fixed by #1943
Labels
enhancement Improved functionality

Comments

@sile
Copy link

sile commented May 25, 2022

Search terms

npm install error, typescript 4.7

Expected Behavior

TypeDoc works well with TypeScript 4.7.

Actual Behavior

npm install fails when both typedoc-0.22.15 and typescript-4.7.2 are specified.

Steps to reproduce the bug

The following commands show the minimum package.json and the install error message:

$ cat package.json
{
    "name": "foo",
    "version": "1.0.0",
    "dependencies": {
        "typedoc": "^0.22.15",
        "typescript": "^4.7.2"
    }
}

$ npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: typedoc-test@1.0.0
npm ERR! Found: typescript@4.7.2
npm ERR! node_modules/typescript
npm ERR!   typescript@"^4.7.2" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer typescript@"4.0.x || 4.1.x || 4.2.x || 4.3.x || 4.4.x || 4.5.x || 4.6.x" from typedoc@0.22.15
npm ERR! node_modules/typedoc
npm ERR!   typedoc@"^0.22.15" from the root project

Environment

  • Typedoc version: 0.22.15
  • TypeScript version: 4.7.2
  • Node.js version: 16.13.0
  • OS: macOS
@sile sile added the bug Functionality does not match expectation label May 25, 2022
@sile sile changed the title npm install failed if both typescript-4.7.x and typedoc-0.22.15 are specified npm install fails if both typescript-4.7.x and typedoc-0.22.15 are specified May 25, 2022
@felixapitzsch
Copy link

When I run npm update --force, I can upgrade to TypeScript 4.7.2. When i run Typedoc in this setup, I get more warnings, but the output looks good and I didn't run into actual problems with my code so far. Are there any known issues with Typedoc and TypeScript 4.7 or could it be added to the allowed version range?

If there are no specific known issues and it just needs testing, a package release with a respective tag would be nice.

@Gerrit0 Gerrit0 added enhancement Improved functionality and removed bug Functionality does not match expectation labels May 25, 2022
@Gerrit0
Copy link
Collaborator

Gerrit0 commented May 25, 2022

There are several things that need to be done to support the new TS version. I'm not sure if I'll have time to get to this until next Monday.

  • Update globs which look for TS files to handle cts/mts
  • Add support for exports/./import|require/types to packages mode (not required for initial release, package.json exports support #1934)
  • Add tests for code using instantiation expressions (don't think there's code changes necessary here, but...)
  • Add tests + support for extends constraints on infer type variables
  • Add support for variance annotations on type parameters (should be displayed in docs)

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

Successfully merging a pull request may close this issue.

3 participants