feat(forms): add better type support for AbstractControl#status - #16841
Closed
Toxicable wants to merge 1 commit into
Closed
feat(forms): add better type support for AbstractControl#status#16841Toxicable wants to merge 1 commit into
Toxicable wants to merge 1 commit into
Conversation
Toxicable
force-pushed
the
status-changes-types
branch
from
May 17, 2017 10:18
b7ebe08 to
4db2d0c
Compare
Toxicable
force-pushed
the
status-changes-types
branch
2 times, most recently
from
May 17, 2017 11:35
3358024 to
2a6dabd
Compare
Contributor
|
Yes, it will break if somebody compares to the While technically it's a breaking change, in fact it exposes bug in user's application. |
Author
|
@devoto13 yeah that's the same thoughts that I had, just wasn't sure if that kind of scenario counts as a breaking change or not |
Toxicable
force-pushed
the
status-changes-types
branch
4 times, most recently
from
July 25, 2017 01:45
90ee991 to
b48fa05
Compare
Toxicable
force-pushed
the
status-changes-types
branch
3 times, most recently
from
July 31, 2017 23:02
cb4c808 to
cc12408
Compare
Toxicable
force-pushed
the
status-changes-types
branch
from
July 31, 2017 23:10
cc12408 to
9f25637
Compare
Toxicable
commented
Jul 31, 2017
| */ | ||
| get statusChanges(): Observable<any> { return this._statusChanges; } | ||
| get statusChanges(): Observable<'VALID'|'INVALID'|'PENDING'|'DISABLED'> { | ||
| return <EventEmitter<any>>this._statusChanges; |
Author
There was a problem hiding this comment.
TS throws here if we don't do this silly cast.
It appears there is some issue where we can't assign EventEmitter<T> to Observable<T>
3 tasks
Author
|
Reopened here #18442 |
|
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. |
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (check one with "x")
What is the current behavior? (You can also link to an open issue here)
Abstract#statusis currently typed tostringwhere as it has four distinct cases of it's valueWhat is the new behavior?
Abstract#statusnow is of type'VALID' | 'INVALID' | 'PENDING' | 'DISABLED'giving slightly better support for the developerDoes this PR introduce a breaking change? (check one with "x")
Im not 100% certain if this is valid, but if someone is comparing
Abstract#statusto a string other than the ones it can possibly be then after this change TS will throw an error at compile timecc @kara