docs: correct types in transform method to match specification. (#29812)
PR Close #29812
This commit is contained in:
parent
3a8f74e392
commit
0051ddf0f3
|
@ -11,8 +11,7 @@ import { Pipe, PipeTransform } from '@angular/core';
|
|||
*/
|
||||
@Pipe({name: 'exponentialStrength'})
|
||||
export class ExponentialStrengthPipe implements PipeTransform {
|
||||
transform(value: number, exponent: string): number {
|
||||
let exp = parseFloat(exponent);
|
||||
return Math.pow(value, isNaN(exp) ? 1 : exp);
|
||||
transform(value: number, exponent?: number): number {
|
||||
return Math.pow(value, isNaN(exponent) ? 1 : exponent);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue