Urara-Blog/node_modules/.pnpm-store/v3/files/46/5b2fb46a6f2594fd8c6aa8bde99bdb0ce038945fab75d787557fd51e4ddc86c36e4272ba268fe78671abecc46ad988992ab317ce81224f00219295153642b4
2022-08-14 01:14:53 +08:00

22 lines
493 B
Text

/**
* @typedef {import('../types.js').Context} Context
* @typedef {import('../types.js').Options} Options
*/
/**
* @param {Context} context
* @returns {Exclude<Options['strong'], undefined>}
*/
export function checkStrong(context) {
const marker = context.options.strong || '*'
if (marker !== '*' && marker !== '_') {
throw new Error(
'Cannot serialize strong with `' +
marker +
'` for `options.strong`, expected `*`, or `_`'
)
}
return marker
}