integrations.emptyRegistryconstno test imports itconst emptyRegistry: RegistryAn empty registry.
The registry of integrations (commons 0019-mizan-integrations FR-002): a typed lookup by the formats an integration reads and writes. An integration is added once; an identifier or a pair of formats and a standard that is already there is refused with a finding, not overwritten.
integrations.emptyRegistryconstno test imports itconst emptyRegistry: RegistryAn empty registry.
integrations.lookupfunctionno test imports itfunction lookup(r: Registry, q: { readonly direction: Direction; readonly from: Format; readonly to: Format; readonly standard?: string | undefined; }): readonly AnyIntegration[]The integrations that read a format and write another, of a direction, for a standard (any standard where none is given).
integrations.registerfunctionno test imports itfunction register(r: Registry, i: AnyIntegration): Result<Registry, RegistryError>A registry with the integration added, or why it was not.
integrations.Registrytypeno test imports ittype Registry = { readonly integrations: readonly AnyIntegration[] };A registry: the integrations added so far, in order.
integrations.RegistryErrortypeno test imports ittype RegistryError =
| { readonly kind: "id-taken"; readonly id: string }
| { readonly kind: "pair-taken"; readonly from: Format; readonly to: Format; readonly standard: string; readonly id: string };Why an integration is not added.
emptyRegistryconstconst emptyRegistry: RegistryAn empty registry.
lookupfunctionfunction lookup(r: Registry, q: { readonly direction: Direction; readonly from: Format; readonly to: Format; readonly standard?: string | undefined; }): readonly AnyIntegration[]The integrations that read a format and write another, of a direction, for a standard (any standard where none is given).
registerfunctionfunction register(r: Registry, i: AnyIntegration): Result<Registry, RegistryError>A registry with the integration added, or why it was not.
Registrytypeno test imports ittype Registry = { readonly integrations: readonly AnyIntegration[] };A registry: the integrations added so far, in order.
RegistryErrortypeno test imports ittype RegistryError =
| { readonly kind: "id-taken"; readonly id: string }
| { readonly kind: "pair-taken"; readonly from: Format; readonly to: Format; readonly standard: string; readonly id: string };Why an integration is not added.