fixed some typescript compile issues

This commit is contained in:
Dolan Miu
2017-04-01 12:18:23 +01:00
parent af48af2854
commit fd350d53db
2 changed files with 11 additions and 4 deletions

View File

@ -1,10 +1,16 @@
import { IData } from "../../media/data";
import { Run } from "../run";
import { Drawing } from "./run-components/drawing";
export class PictureRun extends Run {
constructor(imagePath: string) {
constructor(imageData: IData) {
super();
this.root.push(new Drawing(imagePath));
if (imageData === undefined) {
throw new Error("imageData cannot be undefined");
}
this.root.push(new Drawing(imageData));
}
}