diff --git a/aio/content/examples/pipes/src/app/exponential-strength.pipe.ts b/aio/content/examples/pipes/src/app/exponential-strength.pipe.ts index d277483853..de8a8fca2d 100644 --- a/aio/content/examples/pipes/src/app/exponential-strength.pipe.ts +++ b/aio/content/examples/pipes/src/app/exponential-strength.pipe.ts @@ -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); } }