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

No error on resolution-mode in import() types in stable versions #49354

Closed
DanielRosenwasser opened this issue Jun 2, 2022 · 0 comments · Fixed by #49356
Closed

No error on resolution-mode in import() types in stable versions #49354

DanielRosenwasser opened this issue Jun 2, 2022 · 0 comments · Fixed by #49356
Assignees
Labels
Bug A bug in TypeScript Fix Available A PR has been opened for this issue

Comments

@DanielRosenwasser
Copy link
Member

DanielRosenwasser commented Jun 2, 2022

Using module: nodenext

import type x from "asd" assert { "resolution-mode": "import" };

You'll get

Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.

But that's not the case for the following:

type A = import("", { assert: { "resolution-mode": "import" } }).Foo;

type B = typeof import("", { assert: { "resolution-mode": "import" } });
@DanielRosenwasser DanielRosenwasser changed the title No error on resolution-mode in stable versions No error on resolution-mode in import() in stable versions Jun 2, 2022
@DanielRosenwasser DanielRosenwasser changed the title No error on resolution-mode in import() in stable versions No error on resolution-mode in import() types in stable versions Jun 2, 2022
@DanielRosenwasser DanielRosenwasser added this to the TypeScript 4.7.3 milestone Jun 2, 2022
@DanielRosenwasser DanielRosenwasser added the Bug A bug in TypeScript label Jun 2, 2022
@typescript-bot typescript-bot added the Fix Available A PR has been opened for this issue label Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Fix Available A PR has been opened for this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants