Skip to content
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

Please remove the null type from IAbstractControl statusChanges observable #550

Closed
catalin-tc opened this issue Nov 20, 2021 · 4 comments
Closed

Comments

@catalin-tc
Copy link

Describe the bug

Now that Angular 13 came, we got the Angular native FormControlStatus = 'VALID' | 'INVALID' | 'PENDING' | 'DISABLED';

This doesnt fit with the IAbstractControl interface statusChanges observable which provides 'VALID' | 'INVALID' | 'PENDING' | 'DISABLED' | null.

Because the RxWebs type is larger than the native type, the usual new FormControl(<ControlProp>{...})` now gives a compilation error.

Expected Behavior

In Angular 12 and before you were able to do new FormControl(<ControlProp<T>>{...}).

To Reproduce

Create an angular 13 project, instal RxWeb types and write new FormControl(<ControlProp<someType>>{}) and you will get a compilation error that there is a type mismatch

Package Version

@rxweb/types@^1.0.7

@catalin-tc
Copy link
Author

catalin-tc commented Nov 20, 2021

Looking at the repository, it seems you already changed the type, but the released version (the one from you get from npm install @rxweb/types) still has the null in there.

As a workaround until you release the newest Angular 13 compatible version, I`ll just delete that null from the dist file.

@ajayojha
Copy link
Member

@ciurte-freelance Will be released today.

@catalin-tc
Copy link
Author

@ajayojha It still wasn`t released

@ajayojha
Copy link
Member

@ciurte-freelance package has been released. please update the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants