Commit 53b57428 authored by Jakob Moser's avatar Jakob Moser
Browse files

Improve typing

parent 87d9ecfa
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@ import { State } from "./state.mjs"
 * Instances of this class are not created directly by the user, instead,
 * they are created using the `exercise` function.
 */
class Exercise {
export class Exercise {
    #execute = null
    #context = new ExerciseExecutionContext()

+1 −0
Original line number Diff line number Diff line
/** API to create cards for exercises */

import { createCard, setCardHoverTitle } from "./cards.mjs"
import { Exercise } from "./exercises.api.mjs"
import { createElementWithClass } from "./util.mjs"

/**
+1 −0
Original line number Diff line number Diff line
@@ -76,6 +76,7 @@ function mergeParses(parse1, parse2) {
 * Needed because the terminal uses non-breaking spaces everywhere (to avoid that
 * the browser "intelligently" collapses multiple spaces into one), but JavaScript
 * users just expect normal spaces (as " " !== "   " is true anyways).
 * @param {string} line
 */
function sanitize(line) {
    // Replace non-breaking spaces with normal ones
+1 −0
Original line number Diff line number Diff line
import { State } from "./state.mjs"
import { pooltest, practice } from "./exercises.mjs"
import { createExerciseCard, displayAsSolved, displayAsNonCurrent, displayAsCurrent } from "./exercises.cards.mjs"
import { Exercise } from "./exercises.api.mjs"

let currentTest = null
const currentState = new State()