Skip to content

Commit d0a193e

Browse files
committed
Fix some type checking that TypeScript no longer seems to like.
1 parent 968b706 commit d0a193e

File tree

1 file changed

+12
-12
lines changed
  • libs/providers/langchain-google/src/chat_models/tests

1 file changed

+12
-12
lines changed

libs/providers/langchain-google/src/chat_models/tests/index.test.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ class MockChunkStreamingResponse implements Response {
129129
readonly type: ResponseType = "basic";
130130
readonly url: string = "http://localhost";
131131
readonly bodyUsed: boolean = false;
132-
readonly body: ReadableStream<Uint8Array>;
132+
readonly body: ReadableStream<Uint8Array<ArrayBuffer>>;
133133

134134
constructor(chunks: object[]) {
135135
const encoder = new TextEncoder();
@@ -159,7 +159,7 @@ class MockChunkStreamingResponse implements Response {
159159
async text(): Promise<string> {
160160
throw new Error("Not implemented");
161161
}
162-
async bytes(): Promise<Uint8Array> {
162+
async bytes(): Promise<Uint8Array<ArrayBuffer>> {
163163
throw new Error("Not implemented");
164164
}
165165
clone(): Response {
@@ -844,11 +844,11 @@ describe("Google Mock", () => {
844844
{
845845
handleLLMNewToken(
846846
token: string,
847-
_idx: unknown,
848-
_runId: unknown,
849-
_parentRunId: unknown,
850-
_tags: unknown,
851-
fields: { chunk?: unknown }
847+
_idx,
848+
_runId,
849+
_parentRunId,
850+
_tags,
851+
fields
852852
) {
853853
newTokenCalls.push({ text: token, chunk: fields?.chunk });
854854
},
@@ -961,11 +961,11 @@ describe("Google Mock", () => {
961961
{
962962
handleLLMNewToken(
963963
token: string,
964-
_idx: unknown,
965-
_runId: unknown,
966-
_parentRunId: unknown,
967-
_tags: unknown,
968-
fields: { chunk?: unknown }
964+
_idx,
965+
_runId,
966+
_parentRunId,
967+
_tags,
968+
fields
969969
) {
970970
newTokenCalls.push({ text: token, chunk: fields?.chunk });
971971
},

0 commit comments

Comments
 (0)