test(diffs): type the nullable decorator surface explicitly

This commit is contained in:
Brennan Benson
2026-11-11 08:08:01 -08:00
parent 206d5b1d31
commit bbef95ca5d
@@ -160,14 +160,9 @@ it('keeps note navigation through an overlay-only rebuild and releases actual zo
const fixture = createScrollCommandFixture()
let surface: ReturnType<typeof fixture.bindEditor> | null = fixture.bindEditor()
const consumed = vi.fn(consumeDiffCommentScrollCommand)
const hook = renderHook(
({
current,
label
}: {
current: ReturnType<typeof fixture.bindEditor> | null
label: string
}) => fixture.useDecoratorSurface(current, label, consumed),
type Props = { current: ReturnType<typeof fixture.bindEditor> | null; label: string }
const hook = renderHook<ReturnType<typeof fixture.useDecoratorSurface>, Props>(
({ current, label }) => fixture.useDecoratorSurface(current, label, consumed),
{ initialProps: { current: surface, label: 'Add note' } }
)
const mountCard = async (): Promise<void> => {