question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable into import FormControlStatus

See original GitHub issue

Which @angular/* package(s) are the source of the bug?

forms

Is this a regression?

No

Description

I have a method like:

protected waitForAsyncValidators$(): Observable<FormControlStatus> {
        return this.form.statusChanges
            .pipe(
                startWith(this.form.status),
                tap(status => {
                    this.logService.debug(`Form status: ${status}`);
                }),
                filter(status => status !== FormControlStatus.Pending),
                take(1)
            );
    }

That is being reworked for ng 13 using the new FormControlStatus type.

I’m unable to import the FormControlStatus type. Where am I going wrong?

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

error TS2304: Cannot find name 'FormControlStatus'.

filter(status => status !== FormControlStatus.Pending),

Please provide the environment you discovered this bug in

Angular 13.0.x

Anything else?

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
AndrewKushnircommented, Nov 17, 2021

Thanks for reporting the issue @penfold, the fix would be available in v13.0.3 (in a week from now).

1reaction
penfoldcommented, Nov 17, 2021

@AndrewKushnir Great work. Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

FormControlStatus - Angular
INVALID: Reports that a control is invalid, meaning that an error exists in the input value. PENDING: Reports that a control is pending,...
Read more >
Getting this error "Cannot import "import {FormGroup ...
I want to build a Reactive Form for a simple signup component in Angular. I am trying to import {FormGroup, FormControl} from ...
Read more >
Chapter 11. Validating forms - Angular Development with ...
For example, an app can't log in a user unless they've provided a user ID and a password in ... import { FormControl,...
Read more >
What's new in Angular v13! - Nx Blog
A new type called FormControlStatus was added to enable better type ... time now and dynamic ESM import statements should be used instead....
Read more >
Angular 12 in Depth - Sébastien Dubois
Library authors probably can't migrate to Ivy too fast, but they should ... and allows us to import and use modules from remote...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found