Skip to content

Commit

Permalink
fix(types): avoid errors on certain TS versions
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertCraigie authored and stainless-app[bot] committed Jul 1, 2024
1 parent 39ec9da commit 8a8a23f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/_vendor/partial-json-parser/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ type Token = {
value: string;
};

const tokenize = (input: string) => {
const tokenize = (input: string): Token[] => {
let current = 0;
let tokens = [];
let tokens: Token[] = [];

while (current < input.length) {
let char = input[current];
Expand Down
14 changes: 7 additions & 7 deletions src/lib/MessageStream.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import * as Core from '@anthropic-ai/sdk/core';
import { AnthropicError, APIUserAbortError } from '@anthropic-ai/sdk/error';
import {
ContentBlock,
type ContentBlock,
Messages,
Message,
MessageStreamEvent,
MessageParam,
MessageCreateParams,
MessageCreateParamsBase,
type Message,
type MessageStreamEvent,
type MessageParam,
type MessageCreateParams,
type MessageCreateParamsBase,
type TextBlock,
} from '@anthropic-ai/sdk/resources/messages';
import { type ReadableStream } from '@anthropic-ai/sdk/_shims/index';
import { Stream } from '@anthropic-ai/sdk/streaming';
import { TextBlock } from '@anthropic-ai/sdk/resources';
import { partialParse } from '../_vendor/partial-json-parser/parser';

export interface MessageStreamEvents {
Expand Down

0 comments on commit 8a8a23f

Please sign in to comment.