(arg: any)
| 5 | export function Table<M extends Model = Model>(options: TableOptions<M>): Function; |
| 6 | export function Table(target: Function): void; |
| 7 | export function Table(arg: any): void | Function { |
| 8 | if (typeof arg === 'function') { |
| 9 | annotate(arg); |
| 10 | } else { |
| 11 | const options: TableOptions = { ...arg }; |
| 12 | return (target: any) => annotate(target, options); |
| 13 | } |
| 14 | } |
| 15 | |
| 16 | function annotate(target: typeof Model, options: TableOptions = {}): void { |
| 17 | setModelName(target.prototype, options.modelName || target.name); |
no test coverage detected
searching dependent graphs…