We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
getPasteEdits
update imports on paste
5.7.0-dev.20240926, not a regression
No response
"typescript.experimental.updateImportsOnPaste": true
index.ts
export const a = 1; console.log(a);
Copy console.log(a);
console.log(a);
Create a new untitled file. Change the language mode to typescript
Paste
Err 1215 [12:10:42.591] Exception on executing command { "seq": 266, "type": "request", "command": "getPasteEdits", "arguments": { "file": "^/untitled/ts-nul-authority/Untitled-1", "pastedText": [ "const a = 1;" ], "pasteLocations": [ { "start": { "line": 1, "offset": 1 }, "end": { "line": 1, "offset": 1 } } ], "copiedFrom": { "file": "/Users/matb/projects/sandbox/index.ts", "spans": [ { "start": { "line": 1, "offset": 1 }, "end": { "line": 1, "offset": 13 } } ] } } }: Project '/dev/null/inferredProject3*' does not contain document '/Users/matb/projects/sandbox/index.ts' Error: Project '/dev/null/inferredProject3*' does not contain document '/Users/matb/projects/sandbox/index.ts' at Object.ThrowProjectDoesNotContainDocument (/Users/matb/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-5.7.20240926/node_modules/typescript/lib/typescript.js:183462:11) at InferredProject2.getScriptInfoForNormalizedPath (/Users/matb/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-5.7.20240926/node_modules/typescript/lib/typescript.js:185614:21) at /Users/matb/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-5.7.20240926/node_modules/typescript/lib/typescript.js:193707:291 at Array.map (<anonymous>) at IpcIOSession.getPasteEdits (/Users/matb/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-5.7.20240926/node_modules/typescript/lib/typescript.js:193707:101) at getPasteEdits (/Users/matb/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-5.7.20240926/node_modules/typescript/lib/typescript.js:191842:43) at /Users/matb/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-5.7.20240926/node_modules/typescript/lib/typescript.js:194087:15 at IpcIOSession.executeWithRequestId (/Users/matb/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-5.7.20240926/node_modules/typescript/lib/typescript.js:194076:14) at IpcIOSession.executeCommand (/Users/matb/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-5.7.20240926/node_modules/typescript/lib/typescript.js:194085:29) at IpcIOSession.onMessage (/Users/matb/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-5.7.20240926/node_modules/typescript/lib/typescript.js:194133:68) at process.<anonymous> (/Users/matb/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-5.7.20240926/node_modules/typescript/lib/tsserver.js:525:14) at process.emit (node:events:519:28) at emit (node:internal/child_process:951:14) at process.processTicksAndRejections (node:internal/process/task_queues:83:21)
No error. I think no edits should be generated in this case because we can't import anything
The text was updated successfully, but these errors were encountered:
navya9singh
Successfully merging a pull request may close this issue.
π Search Terms
getPasteEdits
update imports on paste
π Version & Regression Information
5.7.0-dev.20240926, not a regression
β― Playground Link
No response
π» Code
"typescript.experimental.updateImportsOnPaste": true
index.ts
with the following contents and save it to disk:Copy
console.log(a);
Create a new untitled file. Change the language mode to typescript
Paste
π Actual behavior
π Expected behavior
No error. I think no edits should be generated in this case because we can't import anything
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: