Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InferenceWidget stores file for svelte stores #963

Merged
merged 2 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions js/src/lib/components/InferenceWidget/InferenceWidget.svelte
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
<script context="module" lang="ts">
import type { ModelLoadInfo } from "./shared/types";

import { writable } from "svelte/store";

export const modelLoadStates = writable<Record<string, ModelLoadInfo>>({});
</script>

<script lang="ts">
import type { SvelteComponent } from "svelte";
import type { PipelineType } from "../../interfaces/Types";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import WidgetInfo from "../WidgetInfo/WidgetInfo.svelte";
import WidgetModelLoading from "../WidgetModelLoading/WidgetModelLoading.svelte";
import { getModelLoadInfo } from "../../shared/helpers";
import { modelLoadStates } from "../../InferenceWidget.svelte";
import { modelLoadStates } from "../../stores";

export let apiUrl: string;
export let computeTime: string;
Expand Down
4 changes: 4 additions & 0 deletions js/src/lib/components/InferenceWidget/stores.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { writable } from "svelte/store";
import type { ModelLoadInfo } from "./shared/types";

export const modelLoadStates = writable<Record<string, ModelLoadInfo>>({});
3 changes: 2 additions & 1 deletion js/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"strictFunctionTypes": true,
"strictNullChecks": true,
"strictBindCallApply": true,
"experimentalDecorators": true
"experimentalDecorators": true,
"moduleResolution": "node",
}
}
Loading