Skip to content

Schematics code cleanup and refactoring to support strict compilation#18415

Merged
clydin merged 4 commits into
angular:masterfrom
clydin:strict-updates
Aug 3, 2020
Merged

Schematics code cleanup and refactoring to support strict compilation#18415
clydin merged 4 commits into
angular:masterfrom
clydin:strict-updates

Conversation

@clydin
Copy link
Copy Markdown
Member

@clydin clydin commented Jul 31, 2020

Several code changes to support enabling TypeScript's strict compilation options. See individual commits for details.

@clydin clydin added the target: major This PR is targeted for the next major release label Jul 31, 2020
clydin added 4 commits July 31, 2020 14:34
… AST

By leveraging TypeScript's AST type guards, function parameter assumptions and casting can be removed.  Many of these cases caused errors when enabling TypeScript's strict option. This is preliminary work to support enabling full TypeScript strict mode within the project.
This change introduces a helper function (`applyToUpdateRecorder`) that handles all known `Change` classes.  The use of this helper function removes type assumptions within the schematics.  Many of these assumptions caused compilation errors when strict TypeScript options are enabled.
@clydin clydin requested a review from alan-agius4 July 31, 2020 19:06
@alan-agius4 alan-agius4 added the action: merge The PR is ready for merge by the caretaker label Aug 3, 2020
@clydin clydin merged commit dd58aa6 into angular:master Aug 3, 2020
@clydin clydin deleted the strict-updates branch August 3, 2020 19:40
@angular-automatic-lock-bot
Copy link
Copy Markdown

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 Sep 3, 2020
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: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants