Skip to content

Latest commit

 

History

History
39 lines (23 loc) · 1.24 KB

Entity.ExtendEntity.md

File metadata and controls

39 lines (23 loc) · 1.24 KB

Powership / Modules / Entity / ExtendEntity

Interface: ExtendEntity<Parent>

Entity.ExtendEntity

Type parameters

Name
Parent

Callable

ExtendEntity

ExtendEntity<TransformerReturn>(transformer): Parent extends Origin ? { [K in string | number | symbol]: K extends keyof TransformerReturn ? TransformerReturn[K] : K extends keyof Origin ? Origin[K] : never } : never

Extend current entity

Type parameters

Name
TransformerReturn

Parameters

Name Type
transformer (current: { [K in string | number | symbol as K extends _ExtendMethodKeys ? never : K]: Parent[K] }, utils: { extend: <V>(value: V) => ExtendObjectDefinition<V, V> }) => TransformerReturn

Returns

Parent extends Origin ? { [K in string | number | symbol]: K extends keyof TransformerReturn ? TransformerReturn[K] : K extends keyof Origin ? Origin[K] : never } : never

Defined in

packages/entity/src/EntityInterfaces/ExtendEntity.ts:10