refactor(backend): Types
This commit is contained in:
parent
6ad7fbf208
commit
25f9eb2af2
31 changed files with 92 additions and 86 deletions
|
@ -1,8 +1,8 @@
|
|||
import { Connection, EntityManager, IDatabaseDriver } from '@mikro-orm/core';
|
||||
import { EntityManager } from '@mikro-orm/core';
|
||||
import { Attachment } from '../../../src/entities/content/attachment.entity';
|
||||
import { LearningObject } from '../../../src/entities/content/learning-object.entity';
|
||||
|
||||
export function makeTestAttachments(em: EntityManager<IDatabaseDriver<Connection>>, learningObjects: Array<LearningObject>): Array<Attachment> {
|
||||
export function makeTestAttachments(em: EntityManager, learningObjects: Array<LearningObject>): Array<Attachment> {
|
||||
const attachment01 = em.create(Attachment, {
|
||||
learningObject: learningObjects[1],
|
||||
name: 'attachment01',
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { Connection, EntityManager, IDatabaseDriver } from '@mikro-orm/core';
|
||||
import { EntityManager } from '@mikro-orm/core';
|
||||
import { LearningObject, ReturnValue } from '../../../src/entities/content/learning-object.entity';
|
||||
import { Language } from '../../../src/entities/content/language';
|
||||
import { DwengoContentType } from '../../../src/services/learning-objects/processing/content-type';
|
||||
|
||||
export function makeTestLearningObjects(em: EntityManager<IDatabaseDriver<Connection>>): Array<LearningObject> {
|
||||
export function makeTestLearningObjects(em: EntityManager): Array<LearningObject> {
|
||||
const returnValue: ReturnValue = new ReturnValue();
|
||||
returnValue.callbackSchema = '';
|
||||
returnValue.callbackUrl = '';
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { Connection, EntityManager, IDatabaseDriver } from '@mikro-orm/core';
|
||||
import { EntityManager } from '@mikro-orm/core';
|
||||
import { LearningPath } from '../../../src/entities/content/learning-path.entity';
|
||||
import { Language } from '../../../src/entities/content/language';
|
||||
import { LearningPathTransition } from '../../../src/entities/content/learning-path-transition.entity';
|
||||
import { LearningPathNode } from '../../../src/entities/content/learning-path-node.entity';
|
||||
|
||||
export function makeTestLearningPaths(em: EntityManager<IDatabaseDriver<Connection>>): Array<LearningPath> {
|
||||
export function makeTestLearningPaths(em: EntityManager): Array<LearningPath> {
|
||||
const learningPathNode01: LearningPathNode = new LearningPathNode();
|
||||
const learningPathNode02: LearningPathNode = new LearningPathNode();
|
||||
const learningPathNode03: LearningPathNode = new LearningPathNode();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue