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.
Type Parameters
Section titled “Type Parameters”T
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new AssetHandle<
T>(type,path,data?):AssetHandle<T>
Defined in: AssetHandle.ts:7
Parameters
Section titled “Parameters”string
Loader type key (e.g. “texture”, “sound”).
string
Asset path or URL.
unknown
Optional loader metadata that the path can’t carry — e.g. the
@font-face family for a web font. Forwarded to the loader’s
load(path, data); ignored by loaders that don’t read it.
Returns
Section titled “Returns”AssetHandle<T>
Properties
Section titled “Properties”
readonly_type:T
Defined in: AssetHandle.ts:21
Phantom field to preserve the generic type at compile time.
readonlyoptionaldata?:unknown
Defined in: AssetHandle.ts:17
Optional loader metadata that the path can’t carry — e.g. the
@font-face family for a web font. Forwarded to the loader’s
load(path, data); ignored by loaders that don’t read it.
readonlypath:string
Defined in: AssetHandle.ts:11
Asset path or URL.
readonlytype:string
Defined in: AssetHandle.ts:9
Loader type key (e.g. “texture”, “sound”).