test: exactOptionalPropertyTypes 下的 onRetire 捕获类型

This commit is contained in:
creatixchu
2026-08-26 12:12:59 +08:00
parent f1606e31d2
commit c01cf6e549
@@ -135,7 +135,7 @@ describe('sendSession submission echo', () => {
/** Bench with an observable beginSubmission on the session face. */
async function echoBench() {
const b = await bench()
const retire: { onRetire?: (retirement: unknown) => void } = {}
const retire: { onRetire?: ((retirement: unknown) => void) | undefined } = {}
const abandon = vi.fn()
const beginSubmission = vi.fn((input: { onRetire?: (retirement: unknown) => void }) => {
retire.onRetire = input.onRetire