-
Notifications
You must be signed in to change notification settings - Fork 26
Adding TypeScript to vue #1693
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
Adding TypeScript to vue #1693
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File renamed to cjs, so it can work as a module
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
required by new version of vite
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is so that when we access windows.defaultConfig.* in TypeScript files, TypeScript does not complain about not knowing what are you talking about 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prettier doing its work here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I though it was a good idea to at least enable this vue to make sure it is all working
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TypeScript was not super happy about this file so I converted it to ts
| return; | ||
| } | ||
|
|
||
| var me = this; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what TS was complaining about.
| @@ -1,5 +1,5 @@ | |||
| import { reactive, onMounted, watch, computed } from "vue"; | |||
| import { useIsSupported, useIsUpgradeAvailable } from "./serviceSemVer.js"; | |||
| import { useIsSupported, useIsUpgradeAvailable } from "./serviceSemVer"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Next PR, I'll remove all the extensions from imports, they are not required
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another file migrated to ts, very simple one, mostly done because the extra definitions, to ensure they are working
8bd38e7 to
7435755
Compare
It needs to be single quotes
src/ServicePulse.Host.Tests/ApprovalFiles/APIApprovals.PlatformSampleApprovals.approved.txt
Outdated
Show resolved
Hide resolved
82ebb41 to
70073e0
Compare
70073e0 to
1edd374
Compare
PhilBastian
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some questions but otherwise approved
This is the first PR to enable TypeScript.
This PR pretty much just adds all the TypeScript packages, reconfigures
viteand adds a few extra rules toeslintas warnings.