MCPcopy
hub / github.com/nestjs/nest / reflectProperties

Method reflectProperties

packages/core/injector/injector.ts:825–835  ·  view source on GitHub ↗
(type: Type<T>)

Source from the content-addressed store, hash-verified

823 }
824
825 public reflectProperties<T>(type: Type<T>): PropertyDependency[] {
826 const properties = Reflect.getMetadata(PROPERTY_DEPS_METADATA, type) || [];
827 const optionalKeys: string[] =
828 Reflect.getMetadata(OPTIONAL_PROPERTY_DEPS_METADATA, type) || [];
829
830 return properties.map((item: any) => ({
831 ...item,
832 name: item.type,
833 isOptional: optionalKeys.includes(item.key),
834 }));
835 }
836
837 public applyProperties<T = any>(
838 instance: T,

Callers 1

resolvePropertiesMethod · 0.95

Calls 1

getMetadataMethod · 0.45

Tested by

no test coverage detected