Skip to content

Inherit options types set in Base.defaults() #32

Closed
@gr2m

Description

@gr2m

Example

const BaseWithDefaults = Base.defaults({ parentOption: "value" })
const baseWithDefaults = new BaseWithDefaults({ childOption: "value" })

baseWithDefaults.options.childOption // should be typed as string
baseWithDefaults.options.parentOption // should be typed as string

I don't know if this is even possible. Any idea?

Here is a playground with the full source code to mess around with

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions