From 1f53d9405393672e7817a33fcafbf5a8b9269a6a Mon Sep 17 00:00:00 2001 From: kedashoe Date: Wed, 31 Aug 2016 10:20:11 -0700 Subject: [PATCH] give type "string" for pipe transforms --- lib/utils/pipes.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/utils/pipes.ts b/lib/utils/pipes.ts index 3e2c8328..516fcec5 100644 --- a/lib/utils/pipes.ts +++ b/lib/utils/pipes.ts @@ -41,7 +41,7 @@ export class ValuesPipe implements PipeTransform { @Pipe({ name: 'jsonPointerEscape' }) export class JsonPointerEscapePipe implements PipeTransform { - transform(value) { + transform(value:string) { if (isBlank(value)) return value; if (!isString(value)) { throw new InvalidPipeArgumentException(JsonPointerEscapePipe, value); @@ -53,7 +53,7 @@ export class JsonPointerEscapePipe implements PipeTransform { @Pipe({ name: 'marked' }) export class MarkedPipe implements PipeTransform { constructor(private sanitizer: DomSanitizationService) {} - transform(value) { + transform(value:string) { if (isBlank(value)) return value; if (!isString(value)) { throw new InvalidPipeArgumentException(JsonPointerEscapePipe, value); @@ -68,7 +68,7 @@ export class MarkedPipe implements PipeTransform { @Pipe({ name: 'safe' }) export class SafePipe implements PipeTransform { constructor(private sanitizer: DomSanitizationService) {} - transform(value) { + transform(value:string) { if (isBlank(value)) return value; if (!isString(value)) { throw new InvalidPipeArgumentException(JsonPointerEscapePipe, value); @@ -109,7 +109,7 @@ export class PrismPipe implements PipeTransform { @Pipe({ name: 'encodeURIComponent' }) export class EncodeURIComponentPipe implements PipeTransform { - transform(value) { + transform(value:string) { if (isBlank(value)) return value; if (!isString(value)) { throw new InvalidPipeArgumentException(EncodeURIComponentPipe, value);