Skip to content

AssetHandle

Defined in: AssetHandle.ts:6

A phantom-typed handle referencing an asset by type and path. Created by plugin-specific factory functions (e.g. texture(), sound()). Core knows nothing about concrete asset types.

T

new AssetHandle<T>(type, path): AssetHandle<T>

Defined in: AssetHandle.ts:7

string

Loader type key (e.g. “texture”, “sound”).

string

Asset path or URL.

AssetHandle<T>

readonly _type: T

Defined in: AssetHandle.ts:15

Phantom field to preserve the generic type at compile time.


readonly path: string

Defined in: AssetHandle.ts:11

Asset path or URL.


readonly type: string

Defined in: AssetHandle.ts:9

Loader type key (e.g. “texture”, “sound”).