Skip to content

"Fix all" on "add `extends constraint" creates overlapping ranges, fails #50048

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

Closed
DanielRosenwasser opened this issue Jul 25, 2022 · 2 comments · Fixed by #50051
Closed

"Fix all" on "add `extends constraint" creates overlapping ranges, fails #50048

DanielRosenwasser opened this issue Jul 25, 2022 · 2 comments · Fixed by #50051
Assignees
Labels
Bug A bug in TypeScript Domain: Quick Fixes Editor-provided fixes, often called code actions. Effort: Moderate Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual". Fix Available A PR has been opened for this issue Help Wanted You can do this

Comments

@DanielRosenwasser
Copy link
Member

DanielRosenwasser commented Jul 25, 2022

Found from Vue Core at https://github.com/vuejs/core/blob/a95554d35c65e5bfd0bf9d1c5b908ae789345a6d/packages/runtime-core/src/vnode.ts#L166 (#50028)

export interface RendererElement {
    [key: string]: any
}

export interface VNode<HostElement extends RendererElement> {
    target: HostElement | null;
}

export function cloneVNode<U>(vnode: VNode<U>): VNode<U> {
    const cloned: VNode<RendererElement> = {
        target: vnode.target,
    }
    return cloned;
}

Perform the "Add extends constraint to all type parameters" `` quick fix.

Error: Debug Failure. False expression: Changes overlap
Verbose Debug Information: {"pos":359,"end":360} and {"pos":359,"end":360}
    at _loop_10 (c:/Users/Daniel/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-4.8.20220723/node_modules/typescript/lib/tsserver.js:150980:34)
    at c:/Users/Daniel/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-4.8.20220723/node_modules/typescript/lib/tsserver.js:150986:25
    at Object.mapDefined (c:/Users/Daniel/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-4.8.20220723/node_modules/typescript/lib/tsserver.js:622:30)
    at Object.getTextChangesFromChanges (c:/Users/Daniel/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-4.8.20220723/node_modules/typescript/lib/tsserver.js:150974:27)
    at ChangeTracker.getChanges (c:/Users/Daniel/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-4.8.20220723/node_modules/typescript/lib/tsserver.js:150913:45)
    at Function.ChangeTracker.with (c:/Users/Daniel/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-4.8.20220723/node_modules/typescript/lib/tsserver.js:150333:32)
    at Object.getAllCodeActions (c:/Users/Daniel/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-4.8.20220723/node_modules/typescript/lib/tsserver.js:155392:91)
    at Object.getAllFixes (c:/Users/Daniel/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-4.8.20220723/node_modules/typescript/lib/tsserver.js:151585:81)
    at Object.getCombinedCodeFix (c:/Users/Daniel/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-4.8.20220723/node_modules/typescript/lib/tsserver.js:167119:31)
    at IpcIOSession.Session.getCombinedCodeFix (c:/Users/Daniel/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-4.8.20220723/node_modules/typescript/lib/tsserver.js:179359:56)
    at Session.handlers.ts.Map.ts.getEntries._a.<computed> (c:/Users/Daniel/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-4.8.20220723/node_modules/typescript/lib/tsserver.js:177725:61)
    at c:/Users/Daniel/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-4.8.20220723/node_modules/typescript/lib/tsserver.js:179652:96
    at IpcIOSession.Session.executeWithRequestId (c:/Users/Daniel/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-4.8.20220723/node_modules/typescript/lib/tsserver.js:179643:28)
    at IpcIOSession.Session.executeCommand (c:/Users/Daniel/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-4.8.20220723/node_modules/typescript/lib/tsserver.js:179652:41)
    at IpcIOSession.Session.onMessage (c:/Users/Daniel/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-4.8.20220723/node_modules/typescript/lib/tsserver.js:179680:35)
    at process.<anonymous> (c:/Users/Daniel/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-4.8.20220723/node_modules/typescript/lib/tsserver.js:183846:31)
    at process.emit (node:events:390:28)
    at emit (node:internal/child_process:917:12)
    at processTicksAndRejections (node:internal/process/task_queues:84:21)
@DanielRosenwasser DanielRosenwasser added Bug A bug in TypeScript Help Wanted You can do this Effort: Moderate Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual". Domain: Quick Fixes Editor-provided fixes, often called code actions. labels Jul 25, 2022
@DanielRosenwasser DanielRosenwasser added this to the TypeScript 4.8.1 milestone Jul 25, 2022
@weswigham
Copy link
Member

cc @a-tarasyuk who may be slightly interested

@DanielRosenwasser
Copy link
Member Author

Thanks @a-tarasyuk!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: Quick Fixes Editor-provided fixes, often called code actions. Effort: Moderate Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual". Fix Available A PR has been opened for this issue Help Wanted You can do this
Projects
None yet
3 participants