Skip to content

Commit 5f43d87

Browse files
committed
export interfaces and classes that are needed
1 parent 7504385 commit 5f43d87

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/index.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function serialize(form: HTMLFormElement): string {
1414
return params.toString()
1515
}
1616

17-
class ErrorWithResponse extends Error {
17+
export class ErrorWithResponse extends Error {
1818
response: SimpleResponse
1919

2020
constructor(message: string, response: SimpleResponse) {
@@ -34,7 +34,7 @@ function makeDeferred<T>(): [Promise<T>, () => void, () => void] {
3434
return [promise as Promise<T>, resolve!, reject!]
3535
}
3636

37-
interface SimpleRequest {
37+
export interface SimpleRequest {
3838
method: string
3939
url: string
4040
body: FormData | null
@@ -47,11 +47,12 @@ export interface SimpleResponse {
4747
statusText: string
4848
headers: Headers
4949
text: string
50-
json: {[key: string]: unknown}
50+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
51+
json: any
5152
html: DocumentFragment
5253
}
5354

54-
interface Kicker {
55+
export interface Kicker {
5556
text: () => Promise<SimpleResponse>
5657
json: () => Promise<SimpleResponse>
5758
html: () => Promise<SimpleResponse>

0 commit comments

Comments
 (0)