import { IMatcher } from "../../framework/api/IMatcher" ; import { isInstanceOfType } from "./isInstanceOfType" ; import { IType } from "./IType" ; private class InstanceOfTypeMatcher < T > implements IMatcher { private _type : IType < T > ; private constructor ( type ) { this . _type = type ; } param { any } item return { boolean } public matches ( item ) { return isInstanceOfType < T > ( item , this . _type ) ; } } param type return export function instanceOfType < T > ( type ) { return new InstanceOfTypeMatcher < T > ( type ) ; }