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

Add support for handling .js file incorrectly in fixAddMissingMember code fix #14276

Merged
merged 1 commit into from
Mar 28, 2017

Conversation

mhegazy
Copy link
Contributor

@mhegazy mhegazy commented Feb 24, 2017

Missing tests, but there is not a way to get the error to show at the moment.

@mhegazy
Copy link
Contributor Author

mhegazy commented Mar 14, 2017

Merged in #14496 to enable write tests.

@aozgaa
Copy link
Contributor

aozgaa commented Mar 14, 2017

Looks good to me.

Just want to note that this and other codefix changes will need to be ported to work with AST node synthesis in the near future (this or next week?). we might want to temporarily suspend work on adding more quickfix functionality until we get that in.

For example, I've actually ported this AddMissingMembers.ts to work with the factory/visitor over at https://github.com/aozgaa/TypeScript/tree/createTypeNode . Trying to get a PR up ASAP.

fileName: sourceFile.fileName,
textChanges: [{
span: { start: startPos, length: 0 },
newText: `${token.getFullText(sourceFile)}: ${typeString};`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

token.getFullText should probably be token.getText.

@mhegazy mhegazy merged commit 91571f0 into master Mar 28, 2017
@mhegazy mhegazy deleted the updateCodeFixForAddMissingMember branch November 2, 2017 21:00
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants