chore(page-templates): tidy ts suppression in duplicatePage pageEmbed remap (#37)
Replace bare //@ts-ignore (no space, no reason) with // @ts-expect-error plus a reason on the pageEmbed sourcePageId reassignment, matching the codebase style. ProseMirror Attrs is read-only typed, so the reassignment genuinely errors — @ts-expect-error is valid here. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -716,7 +716,7 @@ export class PageService {
|
||||
const sourcePageId = node.attrs.sourcePageId;
|
||||
if (sourcePageId && pageMap.has(sourcePageId)) {
|
||||
const mappedPage = pageMap.get(sourcePageId);
|
||||
//@ts-ignore
|
||||
// @ts-expect-error ProseMirror Attrs is read-only typed; reassigning sourcePageId to the duplicated page copy is intentional here
|
||||
node.attrs.sourcePageId = mappedPage.newPageId;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user