Ga naar hoofdinhoud

classifyToken

Classify a manifest sentinel token for gate / dispatcher consumption: whether it is a known context, a deprecated token, or unknown vocabulary.

Signature

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

const { status, context, deprecation } = classifyToken(token)
ArgumentTypeDescription
tokenstringThe @-prefixed token to classify.

Return value

Returns { status, context, deprecation }:

FieldTypeDescription
status'known' | 'deprecated' | 'unknown'Vocabulary status of the token.
contextstring | nullThe resolution context (filter, config, object, workspace, route, declarative) for a known token, else null.
deprecationobject | nullThe deprecation record (replacement / removal / note) for a deprecated token, else null.

See also