Emit the declaration a hooks module must satisfy, so a project typechecks its hooks against the exact references its content uses.
import { emitHooksDeclaration, parseHookReference } from '@datamoc/mw_games/mwl';const reference = parseHookReference('predicate:holds');console.log(emitHooksDeclaration(reference ? [reference] : []).includes("'predicate:holds'")); Copy
import { emitHooksDeclaration, parseHookReference } from '@datamoc/mw_games/mwl';const reference = parseHookReference('predicate:holds');console.log(emitHooksDeclaration(reference ? [reference] : []).includes("'predicate:holds'"));
Emit the declaration a hooks module must satisfy, so a project typechecks its hooks against the exact references its content uses.