Skip to main content

matchDeprecation

The deprecation entry matching a sentinel token, or null. A deprecated token is still accepted by the schema (its pattern is in the union) but both the vocabulary gate and the resolver flag it — the resolver via a one-time warning (see warnIfDeprecated).

Signature

import { matchDeprecation } from '@conduction/nextcloud-vue'

const entry = matchDeprecation(token)
ArgumentTypeDescription
tokenstringThe @-prefixed token.

Return value

Returns { key, replacement, removal, note } for a deprecated token, or null:

FieldTypeDescription
keystringThe deprecation-map key the token matched.
replacementstring | nullThe canonical replacement token, or null when the token is being removed with no replacement.
removalstringThe removal version / date.
notestringHuman-readable migration note.

See also