Skip to content

Commit 79da010

Browse files
author
hirsch88
committed
Fix type issue
1 parent cf7c7cb commit 79da010

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

src/lib/seed/EntityFactory.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ import { Connection, ObjectType } from 'typeorm';
44
import { FactoryFunction } from './types';
55
import { isPromiseLike } from './utils';
66

7-
/**
8-
* EntityFactory ...
9-
*/
107
export class EntityFactory<Entity, Settings> {
118

129
private mapFunction: (entity: Entity) => Promise<Entity>;

src/lib/seed/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import 'reflect-metadata';
22
import { Connection, ObjectType } from 'typeorm';
33

4-
import { Factory } from '../seeds/Factory';
54
import { EntityFactory } from './EntityFactory';
6-
import { EntityFactoryDefinition, FactoryFunction, SeedConstructor } from './types';
5+
import { EntityFactoryDefinition, Factory, FactoryFunction, SeedConstructor } from './types';
76
import { getNameOfClass } from './utils';
87

98
// -------------------------------------------------------------------------

src/lib/seed/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export type FactoryFunction<Entity, Settings> = (faker: typeof Faker, settings?:
1111
/**
1212
* Factory gets the EntityFactory to the given Entity and pass the settings along
1313
*/
14-
export type Factory = <Entity, Settings>(entity: Entity) => (settings?: Settings) => EntityFactory<Entity, Settings>;
14+
export type Factory = <Entity, Settings>(entity: ObjectType<Entity>) => (settings?: Settings) => EntityFactory<Entity, Settings>;
1515

1616
/**
1717
* Seed are the class to create some data. Those seed are run by the cli.

0 commit comments

Comments
 (0)