Skip to content

Commit

Permalink
Upgrade TypeScript to 4.8 (#583)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoroth committed Sep 30, 2022
1 parent 286f284 commit a5acb81
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 23 deletions.
6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -43,7 +43,7 @@
},
"devDependencies": {
"@rollup/plugin-node-resolve": "^13.0.0",
"@rollup/plugin-typescript": "^8.2.1",
"@rollup/plugin-typescript": "^8.5.0",
"@types/qunit": "^2.9.0",
"@types/webpack-env": "^1.14.0",
"concurrently": "^6.2.1",
Expand All @@ -57,8 +57,8 @@
"rollup": "^2.53",
"rollup-plugin-terser": "^7.0.2",
"ts-loader": "^6.0.4",
"tslib": "^2.3.0",
"typescript": "^4.3.5",
"tslib": "^2.4.0",
"typescript": "^4.8.2",
"webpack": "^4.39.1"
}
}
2 changes: 1 addition & 1 deletion src/core/binding.ts
Expand Up @@ -72,7 +72,7 @@ export class Binding {
const actionEvent: ActionEvent = Object.assign(event, { params })
this.method.call(this.controller, actionEvent)
this.context.logDebugActivity(this.methodName, { event, target, currentTarget, action: this.methodName })
} catch (error) {
} catch (error: any) {
const { identifier, controller, element, index } = this
const detail = { identifier, controller, element, index, event }
this.context.handleError(error, `invoking action "${this.action}"`, detail)
Expand Down
6 changes: 3 additions & 3 deletions src/core/blessing.ts
Expand Up @@ -65,7 +65,7 @@ const getOwnKeys = (() => {
})()

const extend = (() => {
function extendWithReflect<T extends Constructor<{}>>(constructor: T): T {
function extendWithReflect<T extends Constructor<any>>(constructor: T): T {
function extended() {
return Reflect.construct(constructor, arguments, new.target)
}
Expand All @@ -88,7 +88,7 @@ const extend = (() => {
try {
testReflectExtension()
return extendWithReflect
} catch (error) {
return <T extends Constructor<{}>>(constructor: T) => class extended extends constructor {}
} catch (error: any) {
return <T extends Constructor<any>>(constructor: T) => class extended extends constructor {}
}
})()
6 changes: 3 additions & 3 deletions src/core/context.ts
Expand Up @@ -28,7 +28,7 @@ export class Context implements ErrorHandler, TargetObserverDelegate {
try {
this.controller.initialize()
this.logDebugActivity("initialize")
} catch (error) {
} catch (error: any) {
this.handleError(error, "initializing controller")
}
}
Expand All @@ -41,7 +41,7 @@ export class Context implements ErrorHandler, TargetObserverDelegate {
try {
this.controller.connect()
this.logDebugActivity("connect")
} catch (error) {
} catch (error: any) {
this.handleError(error, "connecting controller")
}
}
Expand All @@ -50,7 +50,7 @@ export class Context implements ErrorHandler, TargetObserverDelegate {
try {
this.controller.disconnect()
this.logDebugActivity("disconnect")
} catch (error) {
} catch (error: any) {
this.handleError(error, "disconnecting controller")
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/inheritable_statics.ts
Expand Up @@ -17,7 +17,7 @@ export function readInheritableStaticObjectPairs<T, U>(constructor: Constructor<
}

function getAncestorsForConstructor<T>(constructor: Constructor<T>) {
const ancestors: Constructor<{}>[] = []
const ancestors: Constructor<any>[] = []
while (constructor) {
ancestors.push(constructor)
constructor = Object.getPrototypeOf(constructor)
Expand Down
2 changes: 1 addition & 1 deletion src/mutation-observers/value_list_observer.ts
Expand Up @@ -88,7 +88,7 @@ export class ValueListObserver<T> implements TokenListObserverDelegate {
try {
const value = this.delegate.parseValueForToken(token)
return { value }
} catch (error) {
} catch (error: any) {
return { error }
}
}
Expand Down
48 changes: 37 additions & 11 deletions yarn.lock
Expand Up @@ -35,10 +35,10 @@
is-module "^1.0.0"
resolve "^1.19.0"

"@rollup/plugin-typescript@^8.2.1":
version "8.2.1"
resolved "https://registry.yarnpkg.com/@rollup/plugin-typescript/-/plugin-typescript-8.2.1.tgz#f1a32d4030cc83432ce36a80a922280f0f0b5d44"
integrity sha512-Qd2E1pleDR4bwyFxqbjt4eJf+wB0UKVMLc7/BAFDGVdAXQMCsD4DUv5/7/ww47BZCYxWtJqe1Lo0KVNswBJlRw==
"@rollup/plugin-typescript@^8.5.0":
version "8.5.0"
resolved "https://registry.yarnpkg.com/@rollup/plugin-typescript/-/plugin-typescript-8.5.0.tgz#7ea11599a15b0a30fa7ea69ce3b791d41b862515"
integrity sha512-wMv1/scv0m/rXx21wD2IsBbJFba8wGF3ErJIr6IKRfRj49S85Lszbxb4DCo8iILpluTjk2GAAu9CoZt4G3ppgQ==
dependencies:
"@rollup/pluginutils" "^3.1.0"
resolve "^1.17.0"
Expand Down Expand Up @@ -2678,6 +2678,13 @@ is-core-module@^2.2.0:
dependencies:
has "^1.0.3"

is-core-module@^2.9.0:
version "2.10.0"
resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.10.0.tgz#9012ede0a91c69587e647514e1d5277019e728ed"
integrity sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==
dependencies:
has "^1.0.3"

is-data-descriptor@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56"
Expand Down Expand Up @@ -3767,7 +3774,7 @@ path-key@^2.0.0, path-key@^2.0.1:
resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=

path-parse@^1.0.6:
path-parse@^1.0.6, path-parse@^1.0.7:
version "1.0.7"
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735"
integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==
Expand Down Expand Up @@ -4135,14 +4142,23 @@ resolve-url@^0.2.1:
resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=

resolve@^1.10.0, resolve@^1.17.0, resolve@^1.19.0:
resolve@^1.10.0, resolve@^1.19.0:
version "1.20.0"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975"
integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==
dependencies:
is-core-module "^2.2.0"
path-parse "^1.0.6"

resolve@^1.17.0:
version "1.22.1"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177"
integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==
dependencies:
is-core-module "^2.9.0"
path-parse "^1.0.7"
supports-preserve-symlinks-flag "^1.0.0"

responselike@1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7"
Expand Down Expand Up @@ -4750,6 +4766,11 @@ supports-color@^8.1.0:
dependencies:
has-flag "^4.0.0"

supports-preserve-symlinks-flag@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09"
integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==

tapable@^1.0.0, tapable@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2"
Expand Down Expand Up @@ -4947,11 +4968,16 @@ tslib@^1.9.0:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==

tslib@^2.0.3, tslib@^2.3.0:
tslib@^2.0.3:
version "2.3.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.0.tgz#803b8cdab3e12ba581a4ca41c8839bbb0dacb09e"
integrity sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==

tslib@^2.4.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3"
integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==

tty-browserify@0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6"
Expand Down Expand Up @@ -4997,10 +5023,10 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=

typescript@^4.3.5:
version "4.3.5"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.5.tgz#4d1c37cc16e893973c45a06886b7113234f119f4"
integrity sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==
typescript@^4.8.2:
version "4.8.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.2.tgz#e3b33d5ccfb5914e4eeab6699cf208adee3fd790"
integrity sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==

ua-parser-js@0.7.22:
version "0.7.22"
Expand Down

0 comments on commit a5acb81

Please sign in to comment.