This causes an issue in my code on version 3.1.4. Doing either:
static idColumn = null;
or
static get idColumn() {
return null;
}
Results in a compiler error:
Types of property 'idColumn' are incompatible.
Type 'null' is not assignable to type 'string | string[]```
Only by casting like `static idColumn = null as unknown as string;` can I work around the issue. Not setting idColumn causes runtime errors.
According to documentation, idColumn should be set to null in the event a table does not have an id column: https://vincit.github.io/objection.js/api/model/static-properties.html#static-idcolumn
But due to the typings, null is not a possible valid value for
idColumn
- onlystring | string[]
: https://github.com/Vincit/objection.js/blob/d1e194a3ba58019a90579464459473e26668a4ab/typings/objection/index.d.ts#L1541This causes an issue in my code on version 3.1.4. Doing either:
or
Results in a compiler error: