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
refactor, move to new file
No response
import Event from './test2.js'; export function test(test: Event): void { console.log(test); }
export default class Event { }
then tries to "move to new file" the test function from test1.ts
the function is moved to a new file, but not the import so Event is not resolved in the new file
Event
the whole content of the test1.ts file is moved to a new file (with the import)
It looks like it has something to do with the name, as if it's imported as something else than Event there is no issue
The text was updated successfully, but these errors were encountered:
Failing test case:
/// <reference path='fourslash.ts' /> // @lib: dom // @Filename: /a.ts //// export default class Event {} // @Filename: /b.ts //// import Event from './a.js'; //// [|export function test(test: Event): void {}|] verify.noErrors(); verify.moveToNewFile({ newFileContents: { "/b.ts": "", "/test.ts": `import Event from './a'; export function test(test: Event): void { } `, }, });
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
π Search Terms
refactor, move to new file
π Version & Regression Information
β― Playground Link
No response
π» Code
then tries to "move to new file" the test function from test1.ts
π Actual behavior
the function is moved to a new file, but not the import so
Event
is not resolved in the new fileπ Expected behavior
the whole content of the test1.ts file is moved to a new file (with the import)
Additional information about the issue
It looks like it has something to do with the name, as if it's imported as something else than
Event
there is no issueThe text was updated successfully, but these errors were encountered: