We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d92802d commit fea3514Copy full SHA for fea3514
src/file/paragraph/links/numbered-item-ref.ts
@@ -55,6 +55,8 @@ export class NumberedItemReference extends SimpleField {
55
const { hyperlink = true, referenceFormat = NumberedItemReferenceFormat.FULL_CONTEXT } = options;
56
const baseInstruction = `REF ${bookmarkId}`;
57
58
+ // TODO: Requires TypeScript 5.5 update for it to understand `filter`
59
+ // @ts-expect-error TS2322
60
const switches: readonly Switch[] = [...(hyperlink ? (["\\h"] as const) : []), ...[SWITCH_MAP[referenceFormat]].filter((a) => !!a)];
61
62
const instruction = `${baseInstruction} ${switches.join(" ")}`;
0 commit comments