resolveConversionOptions
resolveConversionOptions(
options?):ResolvedConversionOptions
Defined in: src/presets.ts:195 (opens in a new tab)
Merges one preset with custom options and removes the preset marker.
Custom fields override corresponding preset fields while unrelated preset fields remain active. The returned object is detached from the registry.
Options are validated strictly: an unknown option key, an unknown option
value, or a value of the wrong type is rejected rather than ignored, so a
misspelled policy cannot silently fall back to the engine default. A field
set to undefined is treated as absent. diacritics.all is expanded where
it is written, in the preset or in the custom options, into the classes
not named alongside it, before the two are merged. The merged options are
then checked for the two incompatible pairs of values: longVowels: "circumflex" with circumflexAccent: "circumflex", which would write the
length mark of eta and omega and the circumflex accent alike, and
longVowels: "grave-circumflex" without diacritics.accents: "remove",
which would write the length mark of eta as the grave accent of epsilon. A
preset value counts, so { preset: "bnf-ancient", transliteration: { longVowels: "circumflex" } } is rejected too. The source profile is checked and
resolved as well, on its own, and left out of the result, which holds the
options that write the output. Prepared options give a copy of the options
they write with.
Parameters
Section titled “Parameters”options?
Section titled “options?”ConversionOptions | PreparedOptions = {}
Returns
Section titled “Returns”Throws
Section titled “Throws”If options.preset is not registered at runtime, if
an option key or value is unknown, or if two values are incompatible. An
OptionError is a RangeError.
Throws
Section titled “Throws”If options or an option group has the wrong type.