本文整理汇总了TypeScript中iterare.default函数的典型用法代码示例。如果您正苦于以下问题:TypeScript default函数的具体用法?TypeScript default怎么用?TypeScript default使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了default函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: iterate
public scanFromPrototype<T extends Injectable, R>(
instance: T,
prototype,
callback: (name: string) => R,
): R[] {
return iterate([...this.getAllFilteredMethodNames(prototype)])
.map(callback)
.filter(metadata => !isNil(metadata))
.toArray();
}
示例2: iterate
public createConcreteContext<T extends any[], R extends any[]>(
metadata: T,
): R {
if (isUndefined(metadata) || isEmpty(metadata)) {
return [] as R;
}
return iterate(metadata)
.filter((guard: any) => guard && (guard.name || guard.canActivate))
.map(guard => this.getGuardInstance(guard))
.filter((guard: CanActivate) => guard && isFunction(guard.canActivate))
.toArray() as R;
}
示例3: iterate
public createConcreteContext<T extends any[], R extends any[]>(
metadata: T,
): R {
if (isUndefined(metadata) || isEmpty(metadata)) {
return [] as R;
}
return iterate(metadata)
.filter((pipe: any) => pipe && (pipe.name || pipe.transform))
.map(pipe => this.getPipeInstance(pipe))
.filter(pipe => pipe && pipe.transform && isFunction(pipe.transform))
.map(pipe => pipe.transform.bind(pipe))
.toArray() as R;
}
示例4: iterate
public createConcreteContext<T extends any[], R extends any[]>(
metadata: T,
): R {
if (isUndefined(metadata) || isEmpty(metadata)) {
return [] as R;
}
return iterate(metadata)
.filter(
instance => instance && (isFunction(instance.catch) || instance.name),
)
.map(filter => this.getFilterInstance(filter))
.map(instance => ({
func: instance.catch.bind(instance),
exceptionMetatypes: this.reflectCatchExceptions(instance),
}))
.toArray() as R;
}
示例5: iterate
public createConcreteContext<T extends any[], R extends any[]>(
metadata: T,
): R {
if (isUndefined(metadata) || isEmpty(metadata)) {
return [] as R;
}
return iterate(metadata)
.filter(
(interceptor: any) =>
interceptor && (interceptor.name || interceptor.intercept),
)
.map(interceptor => this.getInterceptorInstance(interceptor))
.filter(
(interceptor: NestInterceptor) =>
interceptor && isFunction(interceptor.intercept),
)
.toArray() as R;
}