diff --git a/projects/player/src/app/pipes/cast.pipe.ts b/projects/player/src/app/pipes/cast.pipe.ts index d3e0502c4918604779bf3d94a78b5b4d609a9da7..ead380e4b9fd89c464b68e8752434b3bfb91629e 100644 --- a/projects/player/src/app/pipes/cast.pipe.ts +++ b/projects/player/src/app/pipes/cast.pipe.ts @@ -4,14 +4,5 @@ import { Pipe, PipeTransform } from '@angular/core'; name: 'cast' }) export class CastPipe implements PipeTransform { - /** - * Cast (S: SuperType) into (T: Type) using @Generics. - * @param value (S: SuperType) obtained from input type. - * @optional @param type (T CastingType) - * type?: { new (): T } - * type?: new () => T - */ - transform<S, T extends S>(value: S, type?: T): T { - return <T>value; - } + transform = <S, T extends S>(value: S, type: T): T => <T>value; }