UNPKG

611 BPlain TextView Raw
1import * as PACKAGE_JSON from 'svelte/package.json';
2
3import { run } from './app.run';
4import App from './components/app/component.svelte';
5import { typeIt } from './shares/utils';
6
7const TYPED_PACKAGE_JSON = typeIt<{ version: string }>(PACKAGE_JSON);
8
9let app: unknown;
10
11run('Svelte', TYPED_PACKAGE_JSON.version, () => {
12 const htmlDivElement: HTMLDivElement | null = document.querySelector('div#svelte');
13 if (htmlDivElement instanceof HTMLDivElement) {
14 // eslint-disable-next-line @typescript-eslint/no-unsafe-call
15 app = new App({
16 target: htmlDivElement,
17 });
18 }
19});
20
21export default app;