diff options
| author | netop://ウィビ <paul@webb.page> | 2026-04-24 11:33:25 -0700 |
|---|---|---|
| committer | netop://ウィビ <paul@webb.page> | 2026-04-24 11:33:25 -0700 |
| commit | 8a59f92d031963e23ecc84b75feecf43eb4dd146 (patch) | |
| tree | 75de5768885583897061a3b1795e4c987ce90039 /source/library/runes.d.ts | |
| download | graphiql-8a59f92d031963e23ecc84b75feecf43eb4dd146.tar.gz graphiql-8a59f92d031963e23ecc84b75feecf43eb4dd146.zip | |
Initial commit: @eol/graphiql v0.3
Svelte 5 GraphiQL alternative for JSR. Covers:
- HTTP fetcher with injectable fetch; SSE/WS stubs
- Session store with tabs, auto-titling, persistence, rename
- Operation detection via graphql parse(); Toolbar picker
- CodeMirror 6 editor via cm6-graphql with theme prop
- Light theme preset (hand-rolled EditorView.theme)
- Doc explorer with breadcrumb nav and type guards
- History panel with 100-entry cap, favorite pinning
- Deno tests for operations, storage, and history eviction
Diffstat (limited to 'source/library/runes.d.ts')
| -rw-r--r-- | source/library/runes.d.ts | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/source/library/runes.d.ts b/source/library/runes.d.ts new file mode 100644 index 0000000..4b73482 --- /dev/null +++ b/source/library/runes.d.ts @@ -0,0 +1,37 @@ + + + +/*** EXPORT ------------------------------------------- ***/ + +/** + * Ambient declarations for Svelte 5 runes so `deno check` can type-check + * `.svelte.ts` files. The runtime forms are injected by the Svelte compiler. + */ + +declare function $state<T>(initial: T): T; +declare function $state<T>(): T | undefined; + +declare namespace $state { + function raw<T>(initial: T): T; + function raw<T>(): T | undefined; + function snapshot<T>(value: T): T; +} + +declare function $derived<T>(expression: T): T; + +declare namespace $derived { + function by<T>(fn: () => T): T; +} + +declare function $effect(fn: () => void | (() => void)): void; + +declare namespace $effect { + function pre(fn: () => void | (() => void)): void; + function root(fn: () => void | (() => void)): () => void; + function tracking(): boolean; +} + +declare function $props<T = Record<string, unknown>>(): T; +declare function $bindable<T>(fallback?: T): T; +declare function $inspect<T>(...values: T[]): { with: (fn: (type: "init" | "update", ...values: T[]) => void) => void }; +declare function $host<T extends HTMLElement = HTMLElement>(): T; |