(type: Type<T>)
| 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, |
no test coverage detected