fix ts not compiling, because of type error
This commit is contained in:
parent
8855f02a56
commit
021ccebdff
1 changed files with 5 additions and 1 deletions
|
@ -9,7 +9,9 @@ let stringPosition = 0;
|
|||
let printTask: number;
|
||||
|
||||
function writeOut() {
|
||||
let currentData: Array<JSON> = data[dataIndex];
|
||||
|
||||
// @ts-ignore
|
||||
let currentData: { [key: string]: string } = data[dataIndex];
|
||||
let currentText: string = currentData["strings"];
|
||||
promptContainer.innerText = promptContainer.innerText + currentText.charAt(stringPosition);
|
||||
stringPosition++;
|
||||
|
@ -19,7 +21,9 @@ function writeOut() {
|
|||
historyContainer.innerHTML = historyContainer.innerHTML + "$ " + promptContainer.innerHTML + "<br><span class=\"gray\">" + currentData["output"] + "</span><br><br>";
|
||||
promptContainer.innerHTML = "";
|
||||
clearInterval(printTask);
|
||||
// @ts-ignore
|
||||
if(dataIndex < data.length){
|
||||
// @ts-ignore
|
||||
setTimeout(startNewTask, data[dataIndex - 1].postDelay);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue