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

ngAcceptInputType_animation is too permissive #61

Closed
1 of 2 tasks
rafaelss95 opened this issue Feb 22, 2021 · 2 comments
Closed
1 of 2 tasks

ngAcceptInputType_animation is too permissive #61

rafaelss95 opened this issue Feb 22, 2021 · 2 comments

Comments

@rafaelss95
Copy link

I'm submitting a ... (check one with "x")

  • bug report => search github for a similar issue or PR before submitting
  • feature request

Current behavior
Since 2.8.0 we can pass to animation something like true or any string and the template won't fail (even under strict mode). It happens because actually ngAcceptInputType_animation masks the real type, as it is too permissive:

static ngAcceptInputType_animation: boolean | string;

The allowed types are:

@Input()
animation: 'progress' | 'progress-dark' | 'pulse' | 'false' | false = 'progress';


Expected behavior
Unless I'm missing something the ngAcceptInputType_animation doesn't seem to help in anything there and thus can be safely removed.

Reproduction of the problem
https://stackblitz.com/edit/angular-ivy-b34arq

Please tell us about your environment:

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX |
    Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

  • Language: [all | TypeScript X.X | ES6/7 | ES5]
    Angular 11, ngx-skeleton-loader 2.9.0.

@rafaelss95 rafaelss95 mentioned this issue Feb 22, 2021
5 tasks
@willmendesneto
Copy link
Owner

The dev mode message was added to describe that behaviour. Also, Angular Universal complains about don't have a boolean expressely added, so its required.

The type was updated to
Screen Shot 2021-02-21 at 10 19 21 pm

Since it's not a problem and it's covered, I'm closing this issue. Thanks again for raising that!

@rafaelss95
Copy link
Author

Also, Angular Universal complains about don't have a boolean expressely added, so its required.

Aha, I didn't know that part, thanks for the info.

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