Skip to content

build: enable TypeScript useUnknownInCatchVariables compiler option #23350

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

Merged
merged 11 commits into from
Jun 14, 2022

Conversation

clydin
Copy link
Member

@clydin clydin commented Jun 10, 2022

Enables the TypeScript useUnknownInCatchVariables option. This option
provides additional code safety by ensuring that the catch clause variable
is the proper type before attempting to access its properties.

Closes #22465

@clydin clydin added the target: minor This PR is targeted for the next minor release label Jun 10, 2022
@clydin clydin force-pushed the catch-clause-unknown branch 2 times, most recently from db779ee to c2bba33 Compare June 13, 2022 20:04
clydin added 11 commits June 13, 2022 16:28
…usage

Prepares the `@ngtools/webpack` package for the eventual change of enabling the
TypeScript `useUnknownInCatchVariables` option. This option provides additional
code safety by ensuring that the catch clause variable is the proper type before
attempting to access its properties. Similar changes will be needed in the other
packages in the repository prior to enabling `useUnknownInCatchVariables`.
… type before usage

Prepares the `@angular-devkit/build-angular` package for the eventual change of enabling the
TypeScript `useUnknownInCatchVariables` option. This option provides additional
code safety by ensuring that the catch clause variable is the proper type before
attempting to access its properties. Similar changes will be needed in the other
packages in the repository prior to enabling `useUnknownInCatchVariables`.
…ore usage

Prepares the `@angular-devkit/core` package for the eventual change of enabling the
TypeScript `useUnknownInCatchVariables` option. This option provides additional
code safety by ensuring that the catch clause variable is the proper type before
attempting to access its properties. Similar changes will be needed in the other
packages in the repository prior to enabling `useUnknownInCatchVariables`.
…pe before usage

Prepares the `@angular-devkit/schematics` package for the eventual change of enabling the
TypeScript `useUnknownInCatchVariables` option. This option provides additional
code safety by ensuring that the catch clause variable is the proper type before
attempting to access its properties. Similar changes will be needed in the other
packages in the repository prior to enabling `useUnknownInCatchVariables`.
…e type before usage

Prepares the `@angular-devkit/schematics-cli` package for the eventual change of enabling the
TypeScript `useUnknownInCatchVariables` option. This option provides additional
code safety by ensuring that the catch clause variable is the proper type before
attempting to access its properties. Similar changes will be needed in the other
packages in the repository prior to enabling `useUnknownInCatchVariables`.
… type before usage

Prepares the `@angular-devkit/build-webpack` package for the eventual change of enabling the
TypeScript `useUnknownInCatchVariables` option. This option provides additional
code safety by ensuring that the catch clause variable is the proper type before
attempting to access its properties. Similar changes will be needed in the other
packages in the repository prior to enabling `useUnknownInCatchVariables`.
…e before usage

Prepares the `@angular-devkit/architect` package for the eventual change of enabling the
TypeScript `useUnknownInCatchVariables` option. This option provides additional
code safety by ensuring that the catch clause variable is the proper type before
attempting to access its properties. Similar changes will be needed in the other
packages in the repository prior to enabling `useUnknownInCatchVariables`.
…tions

Using Jasmine's `expectAsync` allows for reduced test code when testing that
a function returning a promise rejects with a specific error.
…ions

Using Jasmine's `expectAsync` allows for reduced test code when testing that
a function returning a promise rejects with a specific error.
Prepares the E2E tests for the eventual change of enabling the
TypeScript `useUnknownInCatchVariables` option. This option provides additional
code safety by ensuring that the catch clause variable is the proper type before
attempting to access its properties. Similar changes will be needed in the other
packages in the repository prior to enabling `useUnknownInCatchVariables`.
Enables the TypeScript `useUnknownInCatchVariables` option. This option
provides additional code safety by ensuring that the catch clause variable
is the proper type before attempting to access its properties.
@clydin clydin force-pushed the catch-clause-unknown branch from c2bba33 to 833ee84 Compare June 13, 2022 20:38
@clydin clydin marked this pull request as ready for review June 13, 2022 20:38
@clydin clydin added the action: review The PR is still awaiting reviews from at least one requested reviewer label Jun 13, 2022
@clydin clydin requested a review from alan-agius4 June 13, 2022 20:48
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Jun 14, 2022
@alan-agius4 alan-agius4 merged commit 0b7f5d3 into angular:main Jun 14, 2022
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jul 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable useUnknownInCatchVariables in CLI repository
2 participants