@@ -5,23 +5,23 @@ import {TableMetadataArgs} from "../../metadata-args/TableMetadataArgs";
|
5 | 5 | * This decorator is used to mark classes that will be an entity (table or document depend on database type). |
6 | 6 | * Database schema will be created for all classes decorated with it, and Repository can be retrieved and used for it. |
7 | 7 | */ |
8 | | -export function Entity(options?: EntityOptions): Function; |
| 8 | +export function Entity(options?: EntityOptions): ClassDecorator; |
9 | 9 | |
10 | 10 | /** |
11 | 11 | * This decorator is used to mark classes that will be an entity (table or document depend on database type). |
12 | 12 | * Database schema will be created for all classes decorated with it, and Repository can be retrieved and used for it. |
13 | 13 | */ |
14 | | -export function Entity(name?: string, options?: EntityOptions): Function; |
| 14 | +export function Entity(name?: string, options?: EntityOptions): ClassDecorator; |
15 | 15 | |
16 | 16 | /** |
17 | 17 | * This decorator is used to mark classes that will be an entity (table or document depend on database type). |
18 | 18 | * Database schema will be created for all classes decorated with it, and Repository can be retrieved and used for it. |
19 | 19 | */ |
20 | | -export function Entity(nameOrOptions?: string|EntityOptions, maybeOptions?: EntityOptions): Function { |
| 20 | +export function Entity(nameOrOptions?: string|EntityOptions, maybeOptions?: EntityOptions): ClassDecorator { |
21 | 21 | const options = (typeof nameOrOptions === "object" ? nameOrOptions as EntityOptions : maybeOptions) || {}; |
22 | 22 | const name = typeof nameOrOptions === "string" ? nameOrOptions : options.name; |
23 | 23 | |
24 | | -return function (target: Function) { |
| 24 | +return function (target) { |
25 | 25 | getMetadataArgsStorage().tables.push({ |
26 | 26 | target: target, |
27 | 27 | name: name, |
|