Download types/engine/sources.d.ts from nyaaorick/everything-webgpu: direct link, hf CLI and curl.
- Browser
- Download file 1.46 kB
-
https://huggingface.co/nyaaorick/everything-webgpu/resolve/main/types/engine/sources.d.ts
- Command line
-
hf download hf://nyaaorick/everything-webgpu/types/engine/sources.d.ts
-
curl -L -o sources.d.ts https://huggingface.co/nyaaorick/everything-webgpu/resolve/main/types/engine/sources.d.ts
1.46 kB
| /** | |
| * The local label for a model loaded from a URL. | |
| * | |
| * Safe to derive, unlike `modelLib`: an id is a key in our own registry, never | |
| * a path anything fetches, so a wrong guess is visible immediately and costs | |
| * nothing. `.../mlc-ai/Foo-MLC` and `.../models/foo/` both give the last real | |
| * segment. | |
| */ | |
| export function idFromUrl(url: any): string; | |
| /** | |
| * @param {string | object} src | |
| * @param {{id?: string, modelLib?: string}} [opts] | |
| * @returns {{kind: SourceKind, modelId?: string, model?: string, modelLib?: string, files?: unknown}} | |
| */ | |
| export function classifySource(src: string | object, opts?: { | |
| id?: string; | |
| modelLib?: string; | |
| }): { | |
| kind: SourceKind; | |
| modelId?: string; | |
| model?: string; | |
| modelLib?: string; | |
| files?: unknown; | |
| }; | |
| /** | |
| * Ids close enough to be a typo, so an unknown id can say "did you mean". | |
| * | |
| * Cheap on purpose — case-insensitive substring both ways, then a bounded edit | |
| * distance. The list is at most a few hundred entries and this runs once, on a | |
| * path that is already about to throw. | |
| */ | |
| export function nearMatches(wanted: any, available: any, limit?: number): any; | |
| export namespace SOURCE_KIND { | |
| let ID: string; | |
| let REMOTE: string; | |
| let REGISTER: string; | |
| let FILES: string; | |
| } | |
| export function looksLikeUrl(s: any): any; | |
| export function isDataTransfer(v: any): boolean; | |
| export function isFileList(v: any): boolean; | |
| export type SourceKind = "id" | "remote" | "register" | "files"; | |