-
Notifications
You must be signed in to change notification settings - Fork 12k
Pipe generated transform method has wrong parameters #12602
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
Comments
Not sure about this, because I think in general it preferred to specify all the parameter needed. Example; transform(value: any, argOne: number, argTwo?: number): any { |
Yes, I agree, you should always rewrite the method with meaningful parameters and right types, even the first one (value). Perhaps it may generate something like that:
or any other syntax that won't confuse the users. |
Currently , the CLI generates : ```typescript transform(value: any , args?: any) ``` With this commit , it generate : ```typescript transform(value: any, ...args?: any[]) ``` Which conforms to the official doc Fixes angular#12602
Currently , the CLI generates : ```typescript transform(value: any , args?: any) ``` With this commit , it generate : ```typescript transform(value: any, ...args?: any[]) ``` Which conforms to the official doc Fixes #12602
Currently , the CLI generates : ```typescript transform(value: any , args?: any) ``` With this commit , it generate : ```typescript transform(value: any, ...args?: any[]) ``` Which conforms to the official doc Fixes #12602
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. |
Bug Report or Feature Request (mark with an
x
)Command (mark with an
x
)Versions
All versions are affected, including v7.0.0-rc.3.
Repro steps
Problem
The generated method transform has wrong parameters. The second parameter, args, will not receive all the pipe arguments, but only the first one, and other arguments are lost.
The generated method is:
A right version should be:
The text was updated successfully, but these errors were encountered: