import{Model,ModelObject}from"objection";exportdefaultclassMovieextendsModel{statictableName="movies";id!:number;title!:string;release_date!:Date;}// The `ModelObject` generic gives you a clean interface// that can be used on the frontend, without any of the// objection Model class properties or methods.typeMovieShape=ModelObject<Movie>;
I'm a software developer who writes about Laravel, JavaScript, Rails, Linux, Docker, WordPress and the tech industry. Follow me on Twitter @tylerlwsmith
Dang, I had no idea! This is way better. Thank you for sharing, Hunter.
you can set
"strictPropertyInitialization": false,
in you tsconfig and don't have to use!