File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed
_vendor/partial-json-parser Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -3,9 +3,9 @@ type Token = {
3
3
value : string ;
4
4
} ;
5
5
6
- const tokenize = ( input : string ) => {
6
+ const tokenize = ( input : string ) : Token [ ] => {
7
7
let current = 0 ;
8
- let tokens = [ ] ;
8
+ let tokens : Token [ ] = [ ] ;
9
9
10
10
while ( current < input . length ) {
11
11
let char = input [ current ] ;
Original file line number Diff line number Diff line change 1
1
import * as Core from '@anthropic-ai/sdk/core' ;
2
2
import { AnthropicError , APIUserAbortError } from '@anthropic-ai/sdk/error' ;
3
3
import {
4
- ContentBlock ,
4
+ type ContentBlock ,
5
5
Messages ,
6
- Message ,
7
- MessageStreamEvent ,
8
- MessageParam ,
9
- MessageCreateParams ,
10
- MessageCreateParamsBase ,
6
+ type Message ,
7
+ type MessageStreamEvent ,
8
+ type MessageParam ,
9
+ type MessageCreateParams ,
10
+ type MessageCreateParamsBase ,
11
+ type TextBlock ,
11
12
} from '@anthropic-ai/sdk/resources/messages' ;
12
13
import { type ReadableStream } from '@anthropic-ai/sdk/_shims/index' ;
13
14
import { Stream } from '@anthropic-ai/sdk/streaming' ;
14
- import { TextBlock } from '@anthropic-ai/sdk/resources' ;
15
15
import { partialParse } from '../_vendor/partial-json-parser/parser' ;
16
16
17
17
export interface MessageStreamEvents {
You can’t perform that action at this time.
0 commit comments