Closed stockbal closed 1 month ago
Inline types (with --inlineDeclarations structured option)
--inlineDeclarations structured
export function _CompanyAspect<TBase extends new (...args: any[]) => object>(Base: TBase) { return class Company extends Base { address?: { place?: string | null, zip?: string | null, info?: { a?: string | null, a_a?: { a?: string | null, } | null, } | null, } | null; }; }
Bound Actions
export function _CompanyAspect<TBase extends new (...args: any[]) => object>(Base: TBase) { return class Company extends Base { declare static readonly actions: { changeLeader: { // positional (leaderName: string | null): any // named ({leaderName}: {leaderName?: string | null}): any, // metadata (do not use) __parameters: {leaderName?: string | null}, __returns: any, kind: 'action'} } }; }
with --inlineDeclarations structured
export function _CompanyAspect<TBase extends new (...args: any[]) => object>(Base: TBase) { return class Company extends Base { declare ID?: __.Key<string>; declare name?: string | null; declare address?: { place?: string | null, zip?: string | null, info?: { a?: string | null, a_a?: { a?: string | null, } | null, } | null, } | null; static readonly kind: 'entity' | 'type' | 'aspect' = 'entity'; declare static readonly keys: __.KeysOf<Company> declare static readonly actions: { changeLeader: { // positional (leaderName: string | null): any // named ({leaderName}: {leaderName?: string | null}): any // metadata (do not use) __parameters: {leaderName?: string | null}, __returns: any kind: 'action' } } }; }
with --inlineDeclarations flat
--inlineDeclarations flat
export function _CompanyAspect<TBase extends new (...args: any[]) => object>(Base: TBase) { return class Company extends Base { declare ID?: __.Key<string> declare name?: string | null declare address_place?: string | null declare address_zip?: string | null declare address_info_a?: string | null declare address_info_a_a_a?: string | null // inline enums static readonly kind: 'entity' | 'type' | 'aspect' = 'entity'; declare static readonly keys: __.KeysOf<Company> declare static readonly actions: { changeLeader: { // positional (leaderName: string | null): any // named ({leaderName}: {leaderName?: string | null}): any // metadata (do not use) __parameters: {leaderName?: string | null}, __returns: any kind: 'action' } } }; }
Fixes property alignment in generated class functions
Before
Inline types (with
--inlineDeclarations structured
option)Bound Actions
After
with
--inlineDeclarations structured
with
--inlineDeclarations flat