Skip to content

Commit 84d10c3

Browse files
author
Clement Petit
committed
Fix typescript export declaration
1 parent 757bdcb commit 84d10c3

File tree

1 file changed

+22
-19
lines changed

1 file changed

+22
-19
lines changed

types/index.d.ts

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,35 @@
11
// TypeScript Version: 3.0
22

33
export interface ASTNode {
4-
type: 'root' | 'bracket';
5-
nodes: ASTNode[];
6-
stash: string[];
4+
type: 'root' | 'bracket';
5+
nodes: ASTNode[];
6+
stash: string[];
77
}
88

99
export interface State {
10-
input: string;
11-
separator: string;
12-
stack: ASTNode[];
13-
bos(): boolean;
14-
eos(): boolean;
15-
prev(): string;
16-
next(): string;
10+
input: string;
11+
separator: string;
12+
stack: ASTNode[];
13+
bos(): boolean;
14+
eos(): boolean;
15+
prev(): string;
16+
next(): string;
1717
}
1818

1919
export interface Options {
20-
brackets?: { [key: string]: string } | boolean;
21-
quotes?: string[] | boolean;
22-
separator?: string;
23-
strict?: boolean;
24-
keep?(value: string, state: State): boolean;
20+
brackets?: { [key: string]: string } | boolean;
21+
quotes?: string[] | boolean;
22+
separator?: string;
23+
strict?: boolean;
24+
keep?(value: string, state: State): boolean;
2525
}
2626

27-
type SplitFunc = (state: State) => boolean;
27+
export type SplitFunc = (state: State) => boolean;
2828

29-
declare function split(input: string, options?: Options | SplitFunc): string[];
30-
declare function split(input: string, options: Options, fn: SplitFunc): string[];
29+
declare module 'split-string' {
3130

32-
export default split;
31+
declare function split(input: string, options?: Options | SplitFunc): string[];
32+
declare function split(input: string, options: Options, fn: SplitFunc): string[];
33+
34+
export = split;
35+
}

0 commit comments

Comments
 (0)