Skip to content

Commit a873ed9

Browse files
authored
fix(super-editor/ui): cast TextTarget through unknown for story lookup (#3020)
TS2352 in CI: TextTarget doesn't sufficiently overlap with { story?: Record<string, unknown> }, so cast via unknown first.
1 parent 4c5d84e commit a873ed9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/super-editor/src/ui/create-super-doc-ui.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ export function createSuperDocUI(options: SuperDocUIOptions): SuperDocUI {
479479
// doc-api `StoryLocator` shape: `body` carries no extra id;
480480
// `headerFooterSlot` discriminates by section + kind + variant;
481481
// `headerFooterPart` by `refId`; `footnote` / `endnote` by `noteId`.
482-
const story = target ? (target as { story?: Record<string, unknown> }).story : undefined;
482+
const story = target ? (target as unknown as { story?: Record<string, unknown> }).story : undefined;
483483
let storyKey = '';
484484
if (story) {
485485
const storyType = typeof story.storyType === 'string' ? story.storyType : '';

0 commit comments

Comments
 (0)