refactor: Arrays
This commit is contained in:
		
							parent
							
								
									ac10518cb8
								
							
						
					
					
						commit
						e1aba11222
					
				
					 14 changed files with 29 additions and 23 deletions
				
			
		|  | @ -2,7 +2,7 @@ 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, learningObjects: Array<LearningObject>): Array<Attachment> { | ||||
| export function makeTestAttachments(em: EntityManager, learningObjects: LearningObject[]): Attachment[] { | ||||
|     const attachment01 = em.create(Attachment, { | ||||
|         learningObject: learningObjects[1], | ||||
|         name: 'attachment01', | ||||
|  |  | |||
|  | @ -4,7 +4,7 @@ import { Language } from '../../../src/entities/content/language'; | |||
| import { DwengoContentType } from '../../../src/services/learning-objects/processing/content-type'; | ||||
| import { ReturnValue } from '../../../src/entities/content/return-value.entity'; | ||||
| 
 | ||||
| export function makeTestLearningObjects(em: EntityManager): Array<LearningObject> { | ||||
| export function makeTestLearningObjects(em: EntityManager): LearningObject[] { | ||||
|     const returnValue: ReturnValue = new ReturnValue(); | ||||
|     returnValue.callbackSchema = ''; | ||||
|     returnValue.callbackUrl = ''; | ||||
|  |  | |||
|  | @ -4,7 +4,7 @@ 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): Array<LearningPath> { | ||||
| export function makeTestLearningPaths(em: EntityManager): LearningPath[] { | ||||
|     const learningPathNode01: LearningPathNode = new LearningPathNode(); | ||||
|     const learningPathNode02: LearningPathNode = new LearningPathNode(); | ||||
|     const learningPathNode03: LearningPathNode = new LearningPathNode(); | ||||
|  | @ -67,7 +67,7 @@ export function makeTestLearningPaths(em: EntityManager): Array<LearningPath> { | |||
|     learningPathNode05.transitions = [transitions05]; | ||||
|     learningPathNode05.version = 1; | ||||
| 
 | ||||
|     const nodes01: Array<LearningPathNode> = [ | ||||
|     const nodes01: LearningPathNode[] = [ | ||||
|         // LearningPathNode01,
 | ||||
|         // LearningPathNode02,
 | ||||
|     ]; | ||||
|  | @ -81,7 +81,7 @@ export function makeTestLearningPaths(em: EntityManager): Array<LearningPath> { | |||
|         nodes: nodes01, | ||||
|     }); | ||||
| 
 | ||||
|     const nodes02: Array<LearningPathNode> = [ | ||||
|     const nodes02: LearningPathNode[] = [ | ||||
|         // LearningPathNode03,
 | ||||
|         // LearningPathNode04,
 | ||||
|         // LearningPathNode05,
 | ||||
|  |  | |||
		Reference in a new issue