DEV Community

Discussion on: Using a TypeScript interface to define model properties in Objection.js

Collapse
 
atwright147 profile image
Andy Wright

I am finding that combining this with an interface (shared with the UI) helps to keep them in sync. The interface will cause errors if your model is missing any fields

class BlogPost extends Model implements IBlog {
    ...
}
Enter fullscreen mode Exit fullscreen mode