MCPcopy Create free account
hub / github.com/angular/angular / toDefs

Function toDefs

packages/core/test/render3/view_fixture.ts:236–245  ·  view source on GitHub ↗
(
  types: Type<any>[] | (() => Type<any>[]) | undefined | null,
  mapFn: (type: Type<any>) => PipeDef<any> | DirectiveDef<any>,
)

Source from the content-addressed store, hash-verified

234 mapFn: (type: Type<any>) => PipeDef<any>,
235): PipeDefList | null;
236function toDefs(
237 types: Type<any>[] | (() => Type<any>[]) | undefined | null,
238 mapFn: (type: Type<any>) => PipeDef<any> | DirectiveDef<any>,
239): any {
240 if (!types) return null;
241 if (typeof types == 'function') {
242 types = types();
243 }
244 return types.map(mapFn);
245}
246
247function toHtml(element: Element, keepNgReflect = false): string {
248 if (element) {

Callers 1

constructorMethod · 0.85

Calls 1

mapMethod · 0.80

Tested by

no test coverage detected