TagScript
interfaces
Iparser

Interface: IParser

Parsers are used to parse a tag and return a value based on the tag.

Implemented by

Properties

parse

parse: (ctx: Context) => Awaitable<null | string>

Parses the given tag.

Type declaration

▸ (ctx): Awaitable<null | string>

Parameters
NameTypeDescription
ctxContextThe context of the tag.
Returns

Awaitable<null | string>

Defined in

lib/interfaces/index.ts:25


willAccept

willAccept: (ctx: Context) => Awaitable<boolean>

Whether the parser can handle the given tag.

Type declaration

▸ (ctx): Awaitable<boolean>

Parameters
NameTypeDescription
ctxContextThe context of the tag.
Returns

Awaitable<boolean>

Defined in

lib/interfaces/index.ts:31