Skip to content

got 「unknown」 type when using Instance<typeof SomeModel> #2217

Description

@JLUiceman

Bug report

  • I've checked documentation and searched for existing issues and discussions
  • I've made sure my project is based on the latest MST version
  • Fork this code sandbox or another minimal reproduction.

Sandbox link or minimal reproduction code
I try to get the type of model by using Instance method just like the doc recommended, but the result confused me:

when i define a model like the pic below, it works fine
截屏2024-10-22 15 27 30

but when i define a model in this way, i got a unknown type
截屏2024-10-22 15 22 14

Is there anyway i can avoid this or i just missed some key information when reading the doc?

Metadata

Metadata

Assignees

No one assigned

    Labels

    TypescriptIssue related to Typescript typingsdocs or examplesDocumentation or examples related

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions