Types - AssetFile
API reference for ./evaluate/assetFile on @huukhanhnguyen/types.
See the Guide for the package's role.
API reference
Signatures are generated from the live package .d.ts - not hand-written.
AssetFile
type
One row of a scope's COMPUTED asset views (ModelScope.fonts / ModelScope.images): a url-method parameter, reduced to the pair every consumer of it needs. name is the parameter's KEY — what a reference names (a textCurve font arg, a sheet's imageEntity, a pattern chain's image source); url is the parameter's literal url (https:/data:), where the Store pre-loads the bytes from in the async phase. Neither view is a document lane: both are derived from the parameters lane by assetTypeOf, so both are always current.
ONE type for both, not Font and ImageAsset (2026-08-14): the two were the same { name, url } pair, and TypeScript being structural, the two names never once stopped a font row reaching an image consumer. What distinguishes a font row from an image row is which VIEW it came out of, which the field it lands in already says.
type AssetFile
// = {
name: string;
url: string;
}