TestModel.query()
.with(
'idWithRank',
['id', 'rank'],
raw(`VALUES (?, ?), (?, ?), (?, ?)`, [69, 5, 57, 3, 63, 0]),
)
=> failed cause columns is missed in typings for WithMethod
https://github.com/Vincit/objection.js/blob/main/typings/objection/index.d.ts#L598
interface WithMethod<QB extends AnyQueryBuilder> {
(alias: string, expr: CallbackVoid<QB> | AnyQueryBuilder | Raw): QB;
}
but knex can add columns to the alias =>
https://knexjs.org/guide/query-builder.html#with

=> failed cause columns is missed in typings for WithMethod
https://github.com/Vincit/objection.js/blob/main/typings/objection/index.d.ts#L598
but knex can add columns to the alias =>
https://knexjs.org/guide/query-builder.html#with