API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classSingleEntryLayout

@codexo/exojs / assets / stable

CacheLayout for a representation that occupies one record. This is what almost every asset type wants: the codec produced one value, and the cache keeps that one value. It is the default an AssetType carries, so a type that needs nothing else declares nothing at all. Raise the version when the codec's stored representation changes shape. Records written under the old version stop being found and are re-acquired.

1
props
3
methods
0
events
Import
import { SingleEntryLayout } from '@codexo/exojs'

CacheLayout for a representation that occupies one record.

This is what almost every asset type wants: the codec produced one value, and the cache keeps that one value. It is the default an AssetType carries, so a type that needs nothing else declares nothing at all.

Raise the version when the codec's stored representation changes shape. Records written under the old version stop being found and are re-acquired.

Methods3
version(version: number): SingleEntryLayout<Stored>
The single-entry layout at version. Instances are shared per version, so declaring a layout on an asset type costs nothing per type.
Properties1
version: number
The layout version, part of every record key this layout reads or writes.
Source