Anki/ts/editor/index_reviewer.ts
Damien Elmes 366a697b3a Add a runtime proof of concept
The API extractor integration isn't set up properly yet, so I had
to manually generate the d.ts bundle and copy it into the add-on:

cd ts/runtime
bazel run extract_api
cp ../../.bazel/bin/ts/runtime/extract_api.sh.runfiles/ankidesktop/ts/runtime/dist/anki.d.ts \
  $c/anki_new_format_pack/ts/anki-dts/runtime.d.ts
2022-04-03 23:37:35 +10:00

27 lines
734 B
TypeScript

// Copyright: Ankitects Pty Ltd and contributors
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import { globalExport } from "../lib/globals";
import { setupI18n } from "../lib/i18n";
import { uiResolve } from "../lib/ui";
import { editorModules } from "./base";
import ReviewerEditor from "./ReviewerEditor.svelte";
async function setupReviewerEditor(): Promise<void> {
await setupI18n({ modules: editorModules });
new ReviewerEditor({
target: document.body,
props: { uiResolve },
});
}
setupReviewerEditor();
import * as base from "./base";
globalExport(base);
// We could put this into a shared file like runtime-require.ts
// in the future.
import "../runtime";