-
Notifications
You must be signed in to change notification settings - Fork 10
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
Upgrade Typescript to v5 #467
Conversation
b17c2a4
to
514dd05
Compare
f275cab
to
d41923b
Compare
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.
LGTM
this.$fields[index].fillValueFrom(paste); | ||
const field = this.$fields[index]; | ||
field.focus(); | ||
if (paste && 'fillValueFrom' in field) { |
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.
if (paste && 'fillValueFrom' in field) { | |
if (paste && 'fillValueFrom' in field && typeof field.fillValueFrom === 'function') { |
not sure if this is relevant
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 don't think this is necessary.
tsconfig.json
Outdated
@@ -1,8 +1,8 @@ | |||
{ | |||
"compilerOptions": { | |||
/* Basic Options */ | |||
"target": "ES2015", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */ | |||
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ | |||
"target": "ES2020", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */ |
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.
"target": "ES2020", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */ | |
"target": "ES2020", /* Specify ECMAScript target version. */ |
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.
People can learn what values are valid from the docs so we don't have these comments out of sync ?
"target": "ES2015", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */ | ||
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ | ||
"target": "ES2020", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */ | ||
"module": "CommonJS", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ |
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.
"module": "CommonJS", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ | |
"module": "CommonJS", /* Specify module code generation. */ |
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.
Cool, thanks for this.
I added my improvements, feel free to have a look.
The change of static properties of classes to actual js static
s requires an eslint update, so this will be in a separate PR.
@onmax please also review my changes, if you want.
507a78d
to
96a9737
Compare
The force-push is for rebase onto master, with resolved conflicts in the |
96a9737
to
74cad88
Compare
…pe clashs Typecheck service worker separately with ts WebWorker lib, and the rest of the Keyguard with ts DOM lib. Previously, both libs were active in all files (even though webworker was referenced only in the ServiceWorker via a triple slash directive, this enables it globally), which by itself is inappropriate, but also causes type clashs between the DOM and the WebWorker types, which previously were silenced by skipping lib checks. Now, with this change, and typescript having been updated to a recent version, checking libs has been enabled again.
Browser support for padEnd is now sufficiently good.
Allow them to be passed as null or undefined everywhere.
74cad88
to
911729a
Compare
This was already the case before updating typescript to the latest v3 version in 35859ed, which temporarily removed that handling as is was not compatible with newer typescript versions. This commit reimplements this behavior in a different fashion.
For readability and easier understanding.
v4 -> v5 was no changes actually, see the commit history.
This is based on theusdc
branch, so can only be merged after #465 is merged.