Upgrade typescript to 5.5 (#14794)

Typescript 5.5 is supported by our existing Angular version and the next major. Since there are some breaking changes we're creating a separate PR to handle this upgrade and tackling the breaking changes.

TS seems to have changed how they type infer boolean conditions and it infers into type is which means the overloaded function has a different signature. Explicitly marking the return type as boolean makes the TS compiler happy without the behaviour changing.
This commit is contained in:
Oscar Hinton 2025-05-16 09:23:38 +02:00 committed by GitHub
parent 323f0775fd
commit 499715cac3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 8 additions and 9 deletions

View File

@ -119,7 +119,7 @@ export class TwoFactorSetupComponent extends BaseTwoFactorSetupComponent impleme
return this.apiService.getTwoFactorOrganizationProviders(this.organizationId);
}
protected filterProvider(type: TwoFactorProviderType) {
protected filterProvider(type: TwoFactorProviderType): boolean {
return type !== TwoFactorProviderType.OrganizationDuo;
}
}

View File

@ -273,7 +273,7 @@ export class TwoFactorSetupComponent implements OnInit, OnDestroy {
return this.apiService.getTwoFactorProviders();
}
protected filterProvider(type: TwoFactorProviderType) {
protected filterProvider(type: TwoFactorProviderType): boolean {
return type === TwoFactorProviderType.OrganizationDuo;
}

9
package-lock.json generated
View File

@ -172,7 +172,7 @@
"ts-loader": "9.5.2",
"tsconfig-paths-webpack-plugin": "4.2.0",
"type-fest": "2.19.0",
"typescript": "5.4.2",
"typescript": "5.5.4",
"typescript-eslint": "8.31.0",
"typescript-strict-plugin": "2.4.4",
"url": "0.11.4",
@ -36642,11 +36642,10 @@
}
},
"node_modules/typescript": {
"version": "5.4.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz",
"integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==",
"version": "5.5.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz",
"integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==",
"dev": true,
"license": "Apache-2.0",
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"

View File

@ -55,10 +55,10 @@
"@storybook/addon-essentials": "8.6.12",
"@storybook/addon-interactions": "8.6.12",
"@storybook/addon-links": "8.6.12",
"@storybook/test-runner": "0.22.0",
"@storybook/addon-themes": "8.6.12",
"@storybook/angular": "8.6.12",
"@storybook/manager-api": "8.6.12",
"@storybook/test-runner": "0.22.0",
"@storybook/theming": "8.6.12",
"@storybook/web-components-webpack5": "8.6.12",
"@types/argon2-browser": "1.18.4",
@ -138,7 +138,7 @@
"ts-loader": "9.5.2",
"tsconfig-paths-webpack-plugin": "4.2.0",
"type-fest": "2.19.0",
"typescript": "5.4.2",
"typescript": "5.5.4",
"typescript-eslint": "8.31.0",
"typescript-strict-plugin": "2.4.4",
"url": "0.11.4",