You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm new to watermelonDB but having trouble defining my model. There doesn't seem to be a typescript guide. For a start you need to enable experimentalDecorators in tsconfig which doesn't seem to be documented.
I am currently facing the error "Property 'id' has no initializer and is not definitely assigned in the constructor."
import{Model}from'@nozbe/watermelondb'import{field,text,date}from'@nozbe/watermelondb/decorators'exportdefaultclassMeextendsModel{statictable='me'
@text('id')id: string// ❌ throws error "Property 'id' has no initializer and is not definitely assigned in the constructor."}
The text was updated successfully, but these errors were encountered:
mfbx9da4
changed the title
Defining models documentation for typescript - Error "Property 'id' has no initializer and is not definitely assigned in the constructor."
Defining models guide for typescript? (Error: "Property 'id' has no initializer and is not definitely assigned in the constructor.")
Jul 28, 2022
Hi, I'm new to watermelonDB but having trouble defining my model. There doesn't seem to be a typescript guide. For a start you need to enable
experimentalDecorators
in tsconfig which doesn't seem to be documented.I am currently facing the error "Property 'id' has no initializer and is not definitely assigned in the constructor."
The text was updated successfully, but these errors were encountered: