Skip to content

Commit

Permalink
fix: export @computed in typings and bound in Provider (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
tpoisseau committed Nov 10, 2023
1 parent 7ce3c9f commit 3d136b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions adonis-typings/decorators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@ declare module '@ioc:Zakodium/Mongodb/Odm' {
) => DecoratorFn;

export const field: FieldDecorator;
export const computed: ComputedDecorator;
}
3 changes: 2 additions & 1 deletion providers/MongodbProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { getMongodbModelAuthProvider } from '../src/Auth/MongodbModelAuthProvide
import { Database } from '../src/Database/Database';
import createMigration from '../src/Migration';
import { BaseModel, BaseAutoIncrementModel } from '../src/Model/Model';
import { field } from '../src/Odm/decorators';
import { field, computed } from '../src/Odm/decorators';

export default class MongodbProvider {
public constructor(protected app: ApplicationContract) {}
Expand All @@ -30,6 +30,7 @@ export default class MongodbProvider {
BaseAutoIncrementModel:
BaseAutoIncrementModel as unknown as typeof BaseAutoIncrementModelType,
field,
computed,
};
});
}
Expand Down

0 comments on commit 3d136b9

Please sign in to comment.