@types/hotwired__turbo 8.0.1 → 8.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hotwired__turbo/README.md +1 -1
- hotwired__turbo/index.d.ts +30 -3
- hotwired__turbo/package.json +4 -3
hotwired__turbo/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for @hotwired/turbo (https://turbo.hotwir
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hotwired__turbo.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Mon, 11 Nov 2024 19:32:12 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
|
|
14
14
|
# Credits
|
hotwired__turbo/index.d.ts
CHANGED
|
@@ -40,13 +40,31 @@ export class StreamElement extends HTMLElement {
|
|
|
40
40
|
readonly requestId: string;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
export class FetchRequest {
|
|
43
|
+
export class FetchRequest {
|
|
44
|
+
body: FormData | URLSearchParams;
|
|
45
|
+
enctype: "application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain";
|
|
46
|
+
fetchOptions: RequestInit;
|
|
47
|
+
headers: Headers | { [k: string]: any };
|
|
48
|
+
method: "get" | "post" | "put" | "patch" | "delete";
|
|
49
|
+
params: URLSearchParams;
|
|
50
|
+
target: HTMLFormElement | HTMLAnchorElement | FrameElement | null;
|
|
51
|
+
url: URL;
|
|
52
|
+
}
|
|
53
|
+
|
|
44
54
|
export class FetchResponse {
|
|
55
|
+
clientError: boolean;
|
|
56
|
+
contentType: string;
|
|
57
|
+
failed: boolean;
|
|
45
58
|
header(key: string): string | undefined;
|
|
46
|
-
|
|
47
|
-
responseText: Promise<string>;
|
|
59
|
+
isHTML: boolean;
|
|
48
60
|
location: URL;
|
|
61
|
+
redirected: boolean;
|
|
62
|
+
responseHTML: Promise<string>;
|
|
63
|
+
responseText: Promise<string>;
|
|
49
64
|
response: Response;
|
|
65
|
+
serverError: boolean;
|
|
66
|
+
statusCode: number;
|
|
67
|
+
succeeded: boolean;
|
|
50
68
|
}
|
|
51
69
|
|
|
52
70
|
/**
|
|
@@ -157,7 +175,16 @@ export type TurboBeforeStreamRenderEvent = CustomEvent<{
|
|
|
157
175
|
}>;
|
|
158
176
|
|
|
159
177
|
export interface FormSubmission {
|
|
178
|
+
action: string;
|
|
179
|
+
body: FormData | URLSearchParams;
|
|
180
|
+
enctype: "application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain";
|
|
181
|
+
fetchRequest: FetchRequest;
|
|
182
|
+
formElement: HTMLFormElement;
|
|
183
|
+
isSafe: boolean;
|
|
184
|
+
location: URL;
|
|
185
|
+
method: "get" | "post" | "put" | "patch" | "delete";
|
|
160
186
|
stop(): void;
|
|
187
|
+
submitter?: HTMLButtonElement | HTMLInputElement;
|
|
161
188
|
}
|
|
162
189
|
export type FormSubmissionResult =
|
|
163
190
|
| { success: boolean; fetchResponse: FetchResponse }
|
hotwired__turbo/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/hotwired__turbo",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.2",
|
|
4
4
|
"description": "TypeScript definitions for @hotwired/turbo",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hotwired__turbo",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"scripts": {},
|
|
27
27
|
"dependencies": {},
|
|
28
|
-
"
|
|
29
|
-
"
|
|
28
|
+
"peerDependencies": {},
|
|
29
|
+
"typesPublisherContentHash": "f650a9ca94456cc346fc48c3c2ba2c8bcd3d5c4f5113befe5ca20bc6ecc77c9a",
|
|
30
|
+
"typeScriptVersion": "4.9"
|
|
30
31
|
}
|