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

Missing get method model typings #159

Open
strigefleur opened this issue May 5, 2022 · 0 comments
Open

Missing get method model typings #159

strigefleur opened this issue May 5, 2022 · 0 comments

Comments

@strigefleur
Copy link

strigefleur commented May 5, 2022

Is this a regression?

Yes

Description

group: FormGroup<TestModel> = new FormGroup({
   id: 1,
});

// should have error here as there's no 123 key in TestModel
ctrl = this.group.get('123');

interface TestModel {
  id: number;
}

There's no intellisense when typing in control name as an argument so nothing prevents from entering anything but keys of real model.

It worked back there when it was getControl method (~v.1.7).

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

No response

Please provide the environment you discovered this bug in

"typescript": 4.4.4,
"@ngneat/reactive-forms": 4.1.0

Anything else?

No response

Do you want to create a pull request?

No

@strigefleur strigefleur changed the title Missing get method typings #2 Missing get method model typings May 5, 2022
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

1 participant