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

getName() returns the quotes on names that are a string literal... should it? #820

Closed
dsherret opened this issue May 24, 2020 · 1 comment

Comments

@dsherret
Copy link
Owner

dsherret commented May 24, 2020

I was just using ts-morph on a project with some string literals in the property names:

interface Test {
    "test.test": 5,
}

...and calling .getName() returns the string "test.test" instead of test.test. Should it be doing this? Doesn't seem right.

Edit: Perhaps this was done because node.setName(node.getName()) should be a no-op?

@dsherret
Copy link
Owner Author

dsherret commented Feb 7, 2021

Yes. This is done because node.setName(node.getName()) should be a no-op and because of things like name in structures taking a string literal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant