LockedConfig<S>, TypeScript tells you that keyring fields are null; when it returns UnlockedConfig<S>, you know the full data is available. The types described on this page are the building blocks of that contract.
LockedConfig<S>
The result of loading or writing a config without unlocking keyring fields. Keyring-protected fields indata are typed as null and will always be null at runtime — they were never fetched from the OS keyring.
The config data with every
keyring() field replaced by null. All other fields have their normal types.Fetches the keyring-protected values from the OS credential store and returns a new
UnlockedConfig<S> with those fields populated.UnlockedConfig<S>
Holds the full config data with keyring fields populated. Access todata is revoked when you call .lock(), which sets the internal reference to null. This is an API-level access guard — it signals that the calling code is done with the sensitive values; it does not zero-clear memory.
The complete config with all keyring fields resolved to their actual types. Accessing this property after calling
lock() throws "Cannot access data after lock() has been called. Load or unlock again.".Sets the internal data reference to
null. Subsequent reads of data throw an error. Call this when you no longer need the sensitive values within the current scope.PatchedConfig<S>
The result of apatch().run() call. Contains only the partial data that was written — not the full merged config — so the shape is Partial<InferLocked<S>>.
The subset of fields that were included in the patch payload, with keyring fields typed as
null. This is not the full merged config; call load() separately if you need the complete state after patching.LazyConfigEntry<S>
The chainable builder returned bycreate(), load(), and save(). Nothing is sent over IPC until you call .run() or .unlock().
Stores the provided
KeyringOptions on the builder. Call this before .run() when your schema contains keyring() fields, so the plugin knows where to store secrets in the OS keyring.Executes the operation and returns a
LockedConfig<S>. If the schema has keyring fields and you did not call .lock() first, the operation will throw.Executes the operation, stores keyring secrets, and returns an
UnlockedConfig<S> in one step.LazyPatchEntry<S>
The chainable builder returned bypatch(). Adds a .createIfMissing() modifier not present on LazyConfigEntry.
Attaches
KeyringOptions to the builder, required when patching keyring fields.When chained, the patch creates the config from the partial data if the config file does not yet exist, instead of throwing a not-found error.
Executes the patch and returns the patched subset as a
PatchedConfig<S>.Executes the patch with keyring support and returns a fully unlocked
UnlockedConfig<S>.BatchRunResult
Returned by all three static batch methods (Configurate.loadAll, Configurate.saveAll, Configurate.patchAll). Each entry in results is indexed by the id you assigned in the input array and holds either a success value or a structured error.
A map of
id → result. Always check result.ok before accessing result.data; if ok is false, inspect result.error.kind and result.error.message for diagnostics.KeyringOptions
Passed to.lock(), .unlock(), delete(), exportAs(), importFrom(), and LockedConfig.unlock() whenever a keyring operation is needed.
The service name registered in the OS credential store. Typically your application name. Must not be empty and must not contain control characters.
The account name within the service. Typically
"default" or a user identifier. Must not be empty and must not contain control characters.ConfigChangeEvent
The event payload delivered to callbacks registered withonChange() and watchExternal().
The
fileName of the config instance that changed.A string describing what happened. One of:
"create", "save", "patch", "delete", "reset", "import", or "external_change". The "external_change" value is only emitted by watchExternal().An opaque identifier that uniquely identifies the config target. You do not need to construct or compare this value directly; it is provided so you can distinguish which config instance triggered the event when multiple instances share a listener.