Hi! Many thanks for this wonderful library again 🙏
I have a base model that customizes the id prop to id:
@model("BaseModel")
class BaseModel extends Model({
id: idProp,
}) {}
Then I extend this model with some other props:
@model("MyModel")
class MyModel extends ExtendedModel(BaseModel, {
name: prop<string>(),
}) {}
But I get this TS error:
Base constructor return type 'never' is not an object type or intersection of object types with statically known members.
The intersection 'BaseModel & import("/my-project/node_modules/mobx-keystone/dist/model/BaseModel").BaseModel<...> & Omit<...> & ModelPropsToSetter<...>' was reduced to 'never' because property '[modelIdPropertyNameSymbol]' has conflicting types in some constituents.ts(2509)
I tried customizing the idProp on the extended model as well, but that causes an runtime error:
Error: extended model cannot redeclare base model property named 'id'
Looks like the same thing happens when I instead remove idProp from the base model and add it in each extended model.
Hi! Many thanks for this wonderful library again 🙏
I have a base model that customizes the id prop to
id
:Then I extend this model with some other props:
But I get this TS error:
I tried customizing the idProp on the extended model as well, but that causes an runtime error:
Looks like the same thing happens when I instead remove
idProp
from the base model and add it in each extended model.Any hints, please? Thanks!