Files
NapCatQQ/.pnpm-store/v3/files/f5/b2ae9c5f0354537d46a301f6284fcf68e2e9a1503cdbcc037fee70cdc30a9b35c60d449547d9acd8e7281915d3401d2526b0eacec0b452632f4070e5248c82
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

22 lines
480 B
Plaintext

/**
* @import {Options, State} from 'mdast-util-to-markdown'
*/
/**
* @param {State} state
* @returns {Exclude<Options['ruleRepetition'], null | undefined>}
*/
export function checkRuleRepetition(state) {
const repetition = state.options.ruleRepetition || 3
if (repetition < 3) {
throw new Error(
'Cannot serialize rules with repetition `' +
repetition +
'` for `options.ruleRepetition`, expected `3` or more'
)
}
return repetition
}