-
Notifications
You must be signed in to change notification settings - Fork 155
feat(@schematics/angular): strict option #705
Conversation
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.
Missing: the logic to pass the option from new to workspace
const workspaceOptions: WorkspaceOptions = { |
Also, please include tests to verify that the value is set appropriately.
Another note, please also update the documentation to include the option in the CLI repo: https://github.com./angular/angular-cli/blob/master/docs/documentation/new.md
@Brocco Logic and test added, doc added in angular/angular-cli#10497 |
AppVeyor failure not due to this PR. |
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.
One comment for the review.
This is a feature and will not be part of 6.0.0, please create an issue associated for this PR so it can be included and tracked for the 6.1.0 release.
@@ -46,4 +46,18 @@ describe('Ng New Schematic', () => { | |||
const content = tree.readContent('/bar/angular.json'); | |||
expect(content).toMatch(/"prefix": "pre"/); | |||
}); | |||
|
|||
it('should set strict options in tsconfig.json', () => { |
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.
This test should live in the workspace schematic, because that is where the logic exists.
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.
Are you sure? I put it there on purpose, because even if the logic is in the workspace, the user will use this option from ng new
, so putting it there also verify that the option is passed well (to avoid problems like in my initial PR where I missed the passing logic). Or maybe do the test twice?
@hansl @Brocco @StephenFluin Dropped my other features PR, as I've find other ways, but this one would be helpful (as we can't just set In the end it's your decision, so let me know if I should close this PR or not. |
Sorry @cyrilletuzi - this got lost when we moved back to the angular/angular-cli repo. If you still think this pull request is relevant, could you please re-base on that repo and open a new PR there? Thanks and sorry for the extra churn. |
--strict option to configure TypeScript in strict mode when generating an app.
Replaces #397
Redo of #462 because of merge issues.
Updated with last schematics, and there is no side effect, so if you want to merge for v6, that would be great.
Note this PR is for v6 only, as
strictFunctionTypes
requires TS 2.6.@hansl @filipesilva @Brocco