Skip to content

Commit dd581e4

Browse files
authored
fix(core): Fix issue in .d.ts typing for TextEncoder (#7726)
1 parent 7684485 commit dd581e4

File tree

1 file changed

+1
-3
lines changed
  • langchain-core/src/output_parsers

1 file changed

+1
-3
lines changed

langchain-core/src/output_parsers/bytes.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ export class BytesOutputParser extends BaseTransformOutputParser<Uint8Array> {
1313

1414
lc_serializable = true;
1515

16-
// TODO: Figure out why explicit typing is needed
17-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
18-
protected textEncoder: any = new TextEncoder();
16+
protected textEncoder: InstanceType<typeof TextEncoder> = new TextEncoder();
1917

2018
parse(text: string): Promise<Uint8Array> {
2119
return Promise.resolve(this.textEncoder.encode(text));

0 commit comments

Comments
 (0)