src/sq-ts.ts:8:9 - error TS2740: Type 'Model<{}, {}>' is missing the following properties from type 'Thing': $add, $set, $get, $count, and 3 more.
const broken: Thing = await Thing.schema('test').findOne()
~~~~~~
Expected behavior:
No type error
Steps to reproduce:
Use the code from below with the versions specified above.
Related code:
import { Model } from 'sequelize-typescript';
class Thing extends Model<Thing> {
}
(async () => {
const working: Thing = await Thing.findOne()
const broken: Thing = await Thing.schema('test').findOne()
})()
Versions
I'm submitting a ... [x] bug report [ ] feature request
Actual behavior:
Expected behavior: No type error
Steps to reproduce: Use the code from below with the versions specified above.
Related code: