From 0051ddf0f3139370884b909afa78be2e1f99577f Mon Sep 17 00:00:00 2001 From: Piotr Tomiak Date: Wed, 10 Apr 2019 16:39:42 +0300 Subject: [PATCH] docs: correct types in transform method to match specification. (#29812) PR Close #29812 --- .../examples/pipes/src/app/exponential-strength.pipe.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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); } }