Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.

Commit b13ef66

Browse files
authored
Add types composite id and ERROR type (#95)
1 parent 651141d commit b13ef66

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

types/index.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ import { Params, Paginated, Id, NullableId } from '@feathersjs/feathers';
33
import { AdapterService, ServiceOptions, InternalServiceMethods } from '@feathersjs/adapter-commons';
44
import { Model } from 'objection';
55

6+
export const ERROR: symbol;
7+
68
export interface ObjectionServiceOptions extends ServiceOptions {
9+
id: any;
710
model: typeof Model;
811
idSeparator: string;
912
jsonSchema: any;

types/index.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Model } from 'objection';
2-
import service from 'feathers-objection';
2+
import service, { ERROR } from 'feathers-objection';
33

44
class Todo extends Model {
55
static get tableName() {
@@ -8,7 +8,10 @@ class Todo extends Model {
88
}
99

1010
const myService = service({
11+
id: [ 'id', 'name' ],
1112
model: Todo
1213
});
1314

1415
myService.Model.tableName;
16+
17+
typeof ERROR === 'symbol';

0 commit comments

Comments
 (0)