Skip to content

Commit

Permalink
feat: export Refs type to generate a key/value pair of model properti…
Browse files Browse the repository at this point in the history
…es and adapter keys
  • Loading branch information
thetutlage committed Oct 7, 2019
1 parent dc79df7 commit 7567c3a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions adonis-typings/orm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ declare module '@ioc:Adonis/Lucid/Orm' {
ModelConstructorContract,
} from '@ioc:Adonis/Lucid/Model'

/**
* Generate key/value pair of model properties and
* adapter keys
*/
export type Refs<T extends any, K extends keyof T> = {
[P in K]: string
}

export const BaseModel: ModelConstructorContract
export const column: ColumnFn
export const computed: ComputedFn
Expand Down

0 comments on commit 7567c3a

Please sign in to comment.