Skip to content

Commit 08b134e

Browse files
committed
test(types): make tsd happy
1 parent 4bb344a commit 08b134e

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

index.test-d.ts

+5-6
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
getUserMessage,
1818
getUserConfirmation,
1919
type VerificationPublicKey,
20+
type InteropMessage,
2021
CopilotRequestPayload,
2122
prompt,
2223
} from "./index.js";
@@ -79,11 +80,10 @@ export function createAckEventTest() {
7980
expectType<() => string>(event.toString);
8081
expectType<string>(event.toString());
8182

83+
8284
expectType<{
8385
choices: [{
84-
delta: {
85-
content: "", role: "assistant"
86-
}
86+
delta: InteropMessage<"assistant">
8787
}]
8888
}>(event.data);
8989

@@ -98,9 +98,7 @@ export function createTextEventTest() {
9898

9999
expectType<{
100100
choices: [{
101-
delta: {
102-
content: string, role: "assistant"
103-
}
101+
delta: InteropMessage<"assistant">
104102
}]
105103
}>(event.data);
106104

@@ -243,6 +241,7 @@ export function transformPayloadForOpenAICompatibilityTest(payload: CopilotReque
243241
content: string;
244242
role: string;
245243
name?: string
244+
[key: string]: unknown
246245
}[]
247246
}
248247
>(result);

0 commit comments

Comments
 (0)