Closed rafagldev closed 6 months ago
Please see this section of the docs.
In your case, define the store property as:
interface ClsStore {
connection: Terminal<Connection>
}
Oh thank you! I must've skipped that section of the docs. Next time I'll read more thoroughly. 👍
When trying to set a complex object (e.g. a database connection object) the following error appears:
Type instantiation is excessively deep and possibly infinite.ts(2589)
I could set this object with type inference, but it is a feature to nice to be lost.
Maybe there is other way to define the type of object without defining all possible fields in the tree structure. Could a type just be defined as the type itself, without any nesting?