Просмотр исходного кода

test: exactOptionalPropertyTypes 下的 onRetire 捕获类型

creatixchu 1 месяц назад
Родитель
Сommit
c01cf6e549

+ 1 - 1
packages/client/ui-conversation/tests/service-orchestration.client.spec.ts

@@ -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