-
Notifications
You must be signed in to change notification settings - Fork 6.8k
build: enable strictFunctionTypes in schematics #23111
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
build: enable strictFunctionTypes in schematics #23111
Conversation
import * as ts from 'typescript'; | ||
|
||
/** | ||
* Migration that checks for classes that extend Angular Material classes which | ||
* have changed their API. | ||
*/ | ||
export class MiscClassInheritanceMigration extends Migration<null> { | ||
export class MiscClassInheritanceMigration extends DevkitMigration<null> { |
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.
Why have these been changed to a DevkitMigration
? Is it due to the never/unknown
change above for Migration
, where they no longer are subtypes of DevkitMigration
now? (this is what I wanted to achieve with never
in the past).
The goal is to keep them decoupled from DevkitMigration
so that these could technically be run within Google where they do not run within a devkit-based project.
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.
Yeah, pretty much. I noticed that the DevkitMigration
doesn't do all that much on top of the Migration
so I decided to swap them out. If you think that it's not the correct approach, I can try something else.
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.
It seems honestly unlikely at the current state that any of the migrations are needed in g3, but we put a lot of work initially into the infrastructure so that we can run them easily in g3 (without having to replicate logic w/ TSlint as in FW), so it would cool to see if we keep it like that, but if it's too much work then I personally don't mind a lot.
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 pushed another change to default the Context
to any
instead of unknown
.
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.
👍 looks great!
Makes the schematics code compliant with the `strictFunctionTypes` compiler option.
e3ab2df
to
6e17502
Compare
Makes the schematics code compliant with the `strictFunctionTypes` compiler option. (cherry picked from commit 2628d27)
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Makes the schematics code compliant with the
strictFunctionTypes
compiler option.