本文整理汇总了TypeScript中angular2/src/change_detection/pipes/pipe_registry.PipeRegistry类的典型用法代码示例。如果您正苦于以下问题:TypeScript PipeRegistry类的具体用法?TypeScript PipeRegistry怎么用?TypeScript PipeRegistry使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了PipeRegistry类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: it
it("should throw when no matching pipe", () => {
var r = new PipeRegistry({"type": []});
expect(() => r.get("type", "some object", null))
.toThrowError(`Cannot find 'type' pipe supporting object 'some object'`);
});
示例2: it
it("should throw when no matching type", () => {
var r = new PipeRegistry({});
expect(() => r.get("unknown", "some object", null)).toThrowError(`Cannot find a pipe for type 'unknown' object 'some object'`);
});
示例3: expect
expect(() => r.get("type", "some object", null))
示例4: expect
expect(() => r.get("type", "some object", null)).toThrowError(`Cannot find a pipe for type 'type' object 'some object'`);