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

Quick Fix for type: 'date' adds code that does not compile #6

Closed
mprisehk opened this issue May 29, 2024 · 2 comments
Closed

Quick Fix for type: 'date' adds code that does not compile #6

mprisehk opened this issue May 29, 2024 · 2 comments

Comments

@mprisehk
Copy link

I have a Column with type: 'date' for which the Typescript type was string | null. The plugin shows an error for that:
image

It proposes a Quick Fix:
image

However, the Quick Fix adds an unknown type of 'date'. So after the fix, the code no longer compiles:
image

This seems unintentional. Is it supposed to be adding the Javascript type Date (not sure if TypeORM supports that)? Or does it simply map to a string?
Both options are accepted by the plugin:
image
But in any case, the option added by the Quick Fix is incorrect.

@daniel7grant
Copy link
Owner

daniel7grant commented May 31, 2024

You are correct, it had all the types lowercased. I fixed it, so it is matching with the TypeScript types. It will be out in the next release: v0.2.6. Can you try if this corrects the fix message?

@mprisehk
Copy link
Author

mprisehk commented Jun 4, 2024

Tested & it works swimmingly 😄 Thanks!

@mprisehk mprisehk closed this as completed Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants