getByPrototype< T extends AbstractConstructor, P extends PropertyKey = keyof InstanceType<T>,>( props: P[], options?: { all?: false; raw?: false },): T | undefined Parameters
- props: P[]
Optionaloptions: { all?: false; raw?: false }
Returns T | undefined
getByPrototype< T extends AbstractConstructor, P extends PropertyKey = keyof InstanceType<T>,>( props: P[], options: { all: true; raw?: false },): T[] Parameters
- props: P[]
- options: { all: true; raw?: false }
Returns T[]
getByPrototype< T extends AbstractConstructor, P extends PropertyKey = keyof InstanceType<T>,>( props: P[], options: { all?: false; raw: true },): RawModule<T> | undefined Parameters
- props: P[]
- options: { all?: false; raw: true }
Returns RawModule<T> | undefined
Parameters
- props: P[]
- options: { all: true; raw: true }
getByPrototype< T extends AbstractConstructor, P extends PropertyKey = keyof InstanceType<T>,>( props: P[], options?: { all: true; raw?: boolean },): T[] | RawModule<T>[] Parameters
- props: P[]
Optionaloptions: { all: true; raw?: boolean }
getByPrototype< T extends AbstractConstructor, P extends PropertyKey = keyof InstanceType<T>,>( props: P[], options: { all?: false; raw?: boolean },): T | RawModule<T> | undefined Parameters
- props: P[]
- options: { all?: false; raw?: boolean }
Returns T | RawModule<T> | undefined
Parameters
- props: P[]
- options: { all?: boolean; raw: true }
getByPrototype< T extends AbstractConstructor, P extends PropertyKey = keyof InstanceType<T>,>( props: P[], options: { all?: boolean; raw?: false },): T | T[] | undefined Parameters
- props: P[]
- options: { all?: boolean; raw?: false }
Returns T | T[] | undefined
Parameters
- props: P[]
Optionaloptions: { all?: boolean; raw?: boolean }
getByPrototype< T extends AbstractConstructor, P extends PropertyKey[] = (
keyof InstanceType<T>)
[],>( ...props: P,): T | undefined
Retrieves a module(s) by matching properties on their prototype.
Equivalent to
getModule(filters.byPrototype(...props), options).Template: T
The type of the module(s) to retrieve.
Template: P
The type of the property keys to match on the prototype.
Param: args
Either an array of property keys to look for in the prototype, or an array containing the property keys and an optional configuration object.
Returns
The module(s) or processed exports that match the specified prototype properties, or
undefinedif no match is found.See