diff --git a/src/vm.ts b/src/vm.ts index e0b122e..9221955 100644 --- a/src/vm.ts +++ b/src/vm.ts @@ -1,6 +1,15 @@ import { - AsHtml, AsText, BareWord, Concat, HtmlWord, InterpolatedPiece, Script, TextPiece, TextWord, Word -} from './words'; + AsHtml, + AsText, + BareWord, + Concat, + HtmlWord, + InterpolatedPiece, + Script, + TextPiece, + TextWord, + Word, +} from "./words"; /** * "Mode" of the environment a script runs in; determines access to mutability features and such. @@ -31,7 +40,7 @@ export type Vm = { function evaluateWord( state: Vm, word: Word | InterpolatedPiece -): TextWord | BareWord | HtmlWord { +): TextPiece { if ("bare" in word || "text" in word || "html" in word) { return word; } else if ("variable" in word) {