-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Ensure packages can be built with TypeScript strict flag #30993
Closed
devversion
wants to merge
14
commits into
angular:master
from
devversion:refactor/core-wip-strict-flag
Closed
Ensure packages can be built with TypeScript strict flag #30993
devversion
wants to merge
14
commits into
angular:master
from
devversion:refactor/core-wip-strict-flag
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
devversion
force-pushed
the
refactor/core-wip-strict-flag
branch
2 times, most recently
from
June 12, 2019 09:14
4a1d923
to
f93e879
Compare
devversion
added
area: core
Issues related to the framework runtime
action: review
The PR is still awaiting reviews from at least one requested reviewer
labels
Jun 12, 2019
devversion
force-pushed
the
refactor/core-wip-strict-flag
branch
from
June 12, 2019 09:23
f93e879
to
fd10216
Compare
devversion
force-pushed
the
refactor/core-wip-strict-flag
branch
from
June 12, 2019 10:52
fd10216
to
f3a7180
Compare
gkalpak
reviewed
Jun 12, 2019
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.
🎉
alexeagle
reviewed
Jun 12, 2019
devversion
force-pushed
the
refactor/core-wip-strict-flag
branch
from
June 12, 2019 16:31
f3a7180
to
0ef9400
Compare
devversion
added
state: WIP
and removed
action: review
The PR is still awaiting reviews from at least one requested reviewer
labels
Jun 13, 2019
devversion
force-pushed
the
refactor/core-wip-strict-flag
branch
from
June 13, 2019 20:22
0ef9400
to
7a51f10
Compare
devversion
force-pushed
the
refactor/core-wip-strict-flag
branch
from
June 13, 2019 20:57
7a51f10
to
c30cdbf
Compare
petebacondarwin
approved these changes
Jun 14, 2019
mhevery
pushed a commit
that referenced
this pull request
Jul 18, 2019
…30993) As part of FW-1265, the `@angular/common` package is made compatible with the TypeScript `--strict` flag. Read more about the strict flag [here](https://www.typescriptlang.org/docs/handbook/compiler-options.html) PR Close #30993
mhevery
pushed a commit
that referenced
this pull request
Jul 18, 2019
…30993) As part of FW-1265, the `@angular/upgrade` package is made compatible with the TypeScript `--strict` flag. Read more about the strict flag [here](https://www.typescriptlang.org/docs/handbook/compiler-options.html) PR Close #30993
mhevery
pushed a commit
that referenced
this pull request
Jul 18, 2019
…#30993) As part of FW-1265, the `@angular/platform-browser` package is made compatible with the TypeScript `--strict` flag. Read more about the strict flag [here](https://www.typescriptlang.org/docs/handbook/compiler-options.html) PR Close #30993
mhevery
pushed a commit
that referenced
this pull request
Jul 18, 2019
As part of FW-1265, the `@angular/router` package is made compatible with the TypeScript `--strict` flag. Read more about the strict flag [here](https://www.typescriptlang.org/docs/handbook/compiler-options.html) PR Close #30993
mhevery
pushed a commit
that referenced
this pull request
Jul 18, 2019
…0993) As part of FW-1265, the `@angular/forms` package is made compatible with the TypeScript `--strict` flag. Read more about the strict flag [here](https://www.typescriptlang.org/docs/handbook/compiler-options.html) PR Close #30993
mhevery
pushed a commit
that referenced
this pull request
Jul 18, 2019
… flag (#30993) As part of FW-1265, the `@angular/service-worker` package is made compatible with the TypeScript `--strict` flag. Read more about the strict flag [here](https://www.typescriptlang.org/docs/handbook/compiler-options.html) PR Close #30993
mhevery
pushed a commit
that referenced
this pull request
Jul 18, 2019
Fixes all TypeScript failures caused by enabling the `--strict` flag for test source files. We also want to enable the strict options for tests as the strictness enforcement improves the overall codehealth, unveiled common issues and additionally it allows us to enable `strict` in the `tsconfig.json` that is picked up by IDE's. PR Close #30993
mhevery
pushed a commit
that referenced
this pull request
Jul 18, 2019
…with strictFunctionTypes (#30993) Currently developers can use the `By` class to construct common `DebugElement` query predicates. e.g. `By.directive(MyDirective)`. The `directive()` and `all()` predicates are currently returning a predicate that works for `DebugElement` nodes. This return type is too strict since the predicate is not specific to `DebugElement` instances and can also apply to `DebugNode` instances. Meaning that developers are currently able to use the `directive()` predicate when using `queryAllNodes()`. This is a common practice but will break when the project is compiled with TypeScript's `--strictFunctionTypes` flag as the `DebugElement` predicate type is not assignable to predicates for `DebugNode`. In order to make these predicates usable with `--strictFuntionTypes` enabled, we adjust the predicate type to reflect what is actually needed for evaluation of the predicate. PR Close #30993
mhevery
pushed a commit
that referenced
this pull request
Jul 18, 2019
…0993) As part of FW-1265, the `zone.js` package is made compatible with the TypeScript `--strict` flag. Read more about the strict flag [here](https://www.typescriptlang.org/docs/handbook/compiler-options.html) PR Close #30993
devversion
added a commit
to devversion/angular
that referenced
this pull request
Aug 2, 2019
Follow-up to angular#30993 where we build all Angular packages with the TypeScript `--strict` flag. The flag improves overall code health and also helps us catch issues easier.
devversion
added a commit
to devversion/angular
that referenced
this pull request
Aug 13, 2019
…ar#31967) Follow-up to angular#30993 where we build all Angular packages with the TypeScript `--strict` flag. The flag improves overall code health and also helps us catch issues easier. PR Close angular#31967
kara
pushed a commit
that referenced
this pull request
Aug 13, 2019
sabeersulaiman
pushed a commit
to sabeersulaiman/angular
that referenced
this pull request
Sep 6, 2019
…ular#30993) As part of FW-1265, the `@angular/core` package is made compatible with the TypeScript `--strict` flag. This already unveiled a few bugs, so the strictness flag seems to help with increasing the overall code health. Read more about the strict flag [here](https://www.typescriptlang.org/docs/handbook/compiler-options.html) PR Close angular#30993
sabeersulaiman
pushed a commit
to sabeersulaiman/angular
that referenced
this pull request
Sep 6, 2019
…ngular#30993) As part of FW-1265, the `@angular/compiler` package is made compatible with the TypeScript `--strict` flag. This already unveiled a few bugs, so the strictness flag seems to help with increasing the overall code health. Read more about the strict flag [here](https://www.typescriptlang.org/docs/handbook/compiler-options.html) PR Close angular#30993
sabeersulaiman
pushed a commit
to sabeersulaiman/angular
that referenced
this pull request
Sep 6, 2019
Fixes the remaining TypeScript --strict flag failures for source files which are not part of any specific release package. PR Close angular#30993
sabeersulaiman
pushed a commit
to sabeersulaiman/angular
that referenced
this pull request
Sep 6, 2019
) Currently the `ɵɵdefineComponent` method has incorrect type definitions the `directives` and `pipes` metadata property. The incorrect types allow developers to pass in already instantiated `DirectiveDef` or `ComponentDef` objects. This can cause unexpected failures because the definition internally only expects `Type` objects and now incorrectly tries to read the `ngDirectiveDef` or `ngComponentDef` of existing definitions. This issue has been unveiled by enabling the strict function parameter types flag, where the directive definitions are determined from each array element in the `directives` or `pipes` property (which can throw). PR Close angular#30993
sabeersulaiman
pushed a commit
to sabeersulaiman/angular
that referenced
this pull request
Sep 6, 2019
…gular#30993) In View Engine, developers can pass bootstrap and entry components as nested arrays. e.g. ```ts export const MyOtherEntryComponents = [A, B, C] @NgModule({ entryComponents: [MyComp, MyOtherEntryComponents] }) ``` Currently using nested arrays for these properties causes unexpected errors to be reported in Ivy since the semantic NgModule checks aren't properly recursing into the nested entry/bootstrap components. This issue has been unveiled by enabling the strict function parameter checks. PR Close angular#30993
sabeersulaiman
pushed a commit
to sabeersulaiman/angular
that referenced
this pull request
Sep 6, 2019
…ngular#30993) As part of FW-1265, the `@angular/common` package is made compatible with the TypeScript `--strict` flag. Read more about the strict flag [here](https://www.typescriptlang.org/docs/handbook/compiler-options.html) PR Close angular#30993
sabeersulaiman
pushed a commit
to sabeersulaiman/angular
that referenced
this pull request
Sep 6, 2019
…ngular#30993) As part of FW-1265, the `@angular/upgrade` package is made compatible with the TypeScript `--strict` flag. Read more about the strict flag [here](https://www.typescriptlang.org/docs/handbook/compiler-options.html) PR Close angular#30993
sabeersulaiman
pushed a commit
to sabeersulaiman/angular
that referenced
this pull request
Sep 6, 2019
…angular#30993) As part of FW-1265, the `@angular/platform-browser` package is made compatible with the TypeScript `--strict` flag. Read more about the strict flag [here](https://www.typescriptlang.org/docs/handbook/compiler-options.html) PR Close angular#30993
sabeersulaiman
pushed a commit
to sabeersulaiman/angular
that referenced
this pull request
Sep 6, 2019
…30993) As part of FW-1265, the `@angular/router` package is made compatible with the TypeScript `--strict` flag. Read more about the strict flag [here](https://www.typescriptlang.org/docs/handbook/compiler-options.html) PR Close angular#30993
sabeersulaiman
pushed a commit
to sabeersulaiman/angular
that referenced
this pull request
Sep 6, 2019
…gular#30993) As part of FW-1265, the `@angular/forms` package is made compatible with the TypeScript `--strict` flag. Read more about the strict flag [here](https://www.typescriptlang.org/docs/handbook/compiler-options.html) PR Close angular#30993
sabeersulaiman
pushed a commit
to sabeersulaiman/angular
that referenced
this pull request
Sep 6, 2019
… flag (angular#30993) As part of FW-1265, the `@angular/service-worker` package is made compatible with the TypeScript `--strict` flag. Read more about the strict flag [here](https://www.typescriptlang.org/docs/handbook/compiler-options.html) PR Close angular#30993
sabeersulaiman
pushed a commit
to sabeersulaiman/angular
that referenced
this pull request
Sep 6, 2019
…0993) Fixes all TypeScript failures caused by enabling the `--strict` flag for test source files. We also want to enable the strict options for tests as the strictness enforcement improves the overall codehealth, unveiled common issues and additionally it allows us to enable `strict` in the `tsconfig.json` that is picked up by IDE's. PR Close angular#30993
sabeersulaiman
pushed a commit
to sabeersulaiman/angular
that referenced
this pull request
Sep 6, 2019
…with strictFunctionTypes (angular#30993) Currently developers can use the `By` class to construct common `DebugElement` query predicates. e.g. `By.directive(MyDirective)`. The `directive()` and `all()` predicates are currently returning a predicate that works for `DebugElement` nodes. This return type is too strict since the predicate is not specific to `DebugElement` instances and can also apply to `DebugNode` instances. Meaning that developers are currently able to use the `directive()` predicate when using `queryAllNodes()`. This is a common practice but will break when the project is compiled with TypeScript's `--strictFunctionTypes` flag as the `DebugElement` predicate type is not assignable to predicates for `DebugNode`. In order to make these predicates usable with `--strictFuntionTypes` enabled, we adjust the predicate type to reflect what is actually needed for evaluation of the predicate. PR Close angular#30993
sabeersulaiman
pushed a commit
to sabeersulaiman/angular
that referenced
this pull request
Sep 6, 2019
…gular#30993) As part of FW-1265, the `zone.js` package is made compatible with the TypeScript `--strict` flag. Read more about the strict flag [here](https://www.typescriptlang.org/docs/handbook/compiler-options.html) PR Close angular#30993
sabeersulaiman
pushed a commit
to sabeersulaiman/angular
that referenced
this pull request
Sep 6, 2019
…ar#31967) Follow-up to angular#30993 where we build all Angular packages with the TypeScript `--strict` flag. The flag improves overall code health and also helps us catch issues easier. PR Close angular#31967
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. |
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
area: core
Issues related to the framework runtime
cla: yes
target: major
This PR is targeted for the next major release
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implemented as part of FW-1265. See individual commits for description of changes.