-
Notifications
You must be signed in to change notification settings - Fork 12.8k
<semantic> TS Server Error Debug Failure when moving to a js file #59240
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
Comments
This comment has been minimized.
This comment has been minimized.
I managed to reproduce this error minimally (repo). It occurs on namespace accesses from a module with Example: // mod.ts
export * as Mod from "./mod.js"
export type A = string
// index.ts
import { Mod } from "./mod"
type B = Mod.A Doing the "Move to file" or "Move to a new file" refactors on
Although this might hint at where the problem actually is, it's probably broader than this, because I'm seemingly hitting other cases that don't involve this 🤔 |
Minimal repro of the original issue: /// <reference path='fourslash.ts' />
// @allowjs: true
// @Filename: /start.js
//// // @ts-check
////
//// [|const startServer = require('./server.js');
////
//// startServer();|]
// @Filename: /server.js
//// // @ts-check
////
//// function startServer() {
//// }
//// module.exports = startServer;
verify.moveToNewFile({
newFileContents: {
"/start.js":
``,
"/startServer.js":
`<div>a</div>;
`,
}
}); @itsMapleLeaf #59240 (comment) should be fixed after #60333. I think the case you repro-ed is similar to #58897, and is included in my PR. |
Repo/file: https://github.com/xtermjs/xterm.js/blob/995ccc72f85dc2f8ab1353dacbfea12202b4a16c/demo/start.js
TypeScript output:
The text was updated successfully, but these errors were encountered: