CatalogState
The catalog’s type-level state. meters is a union of MeterEntry interfaces.
Large catalogs (hundreds of chained .meter() calls) stay cheap for tsc because each step’s state is
written out as a plain MeteringState<…> reference in meter()’s return type. Do not wrap it in a type alias:
an alias keeps the previous state as an alias type argument, TypeScript re-instantiates that chain
recursively, and the checker hits its instantiation depth limit at ~100 meters.
Properties
Bölüm başlığı “Properties”commit
Bölüm başlığı “commit”commit:
boolean
ctx:
BaseContext
meters
Bölüm başlığı “meters”meters:
MeterEntry
pools:
string
Ids that can be feeds targets, kept incrementally (deriving them from meters is quadratic).
rate:
boolean
ref:
string