ReadonlynameAlways "KnownValuesError"; the cross-copy identity KnownValuesError.isKnownValuesError checks.
ReadonlycodeThe discriminant; equals details.code.
ReadonlydetailsThe structured payload.
StaticinvalidAn argument outside its domain: <parameter> must be <expectation>, got <value>.
StaticioA registry file or directory that cannot be read; message is the reference's IO error: … text.
StaticjsonA registry file that does not parse; message is the reference's text (the serde_json message, prefixed by the loader with the file).
StaticalreadyThe directory configuration was changed after the global store was built.
StaticisWhether x is a KnownValuesError, from this module copy or another
(a CommonJS and an ESM copy in one process): checks the name and the
presence of code, not instanceof.
Thrown for an argument outside its domain (
InvalidParameter, JS-only), a registry file that cannot be read (Io) or parsed (Json), and a directory configuration changed after the global store was built (AlreadyInitialized). Branch oncode; the messages of the last three are the reference'sDisplaystrings.Instances come from the static factories only.
Example