Skip to content

Commit 3d136b9

Browse files
authored
fix: export @computed in typings and bound in Provider (#155)
1 parent 7ce3c9f commit 3d136b9

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

adonis-typings/decorators.ts

+1
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,5 @@ declare module '@ioc:Zakodium/Mongodb/Odm' {
4545
) => DecoratorFn;
4646

4747
export const field: FieldDecorator;
48+
export const computed: ComputedDecorator;
4849
}

providers/MongodbProvider.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { getMongodbModelAuthProvider } from '../src/Auth/MongodbModelAuthProvide
1010
import { Database } from '../src/Database/Database';
1111
import createMigration from '../src/Migration';
1212
import { BaseModel, BaseAutoIncrementModel } from '../src/Model/Model';
13-
import { field } from '../src/Odm/decorators';
13+
import { field, computed } from '../src/Odm/decorators';
1414

1515
export default class MongodbProvider {
1616
public constructor(protected app: ApplicationContract) {}
@@ -30,6 +30,7 @@ export default class MongodbProvider {
3030
BaseAutoIncrementModel:
3131
BaseAutoIncrementModel as unknown as typeof BaseAutoIncrementModelType,
3232
field,
33+
computed,
3334
};
3435
});
3536
}

0 commit comments

Comments
 (0)