@mojojs/core 1.1.2 → 1.1.3
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.
- package/lib/types.d.ts +4 -4
- package/package.json +1 -1
package/lib/types.d.ts
CHANGED
|
@@ -23,12 +23,12 @@ export declare type JSONObject = {
|
|
|
23
23
|
};
|
|
24
24
|
export declare type MojoApp = App;
|
|
25
25
|
export interface MojoContext extends Context {
|
|
26
|
-
buttonTo(target: URLTarget, attrs: TagAttrs, text: string)
|
|
26
|
+
buttonTo: (target: URLTarget, attrs: TagAttrs, text: string) => SafeString;
|
|
27
27
|
checkBoxTag: (name: string, attrs?: TagAttrs) => Promise<SafeString>;
|
|
28
28
|
currentRoute: () => string | null;
|
|
29
29
|
exception: (error: Error) => Promise<boolean>;
|
|
30
30
|
faviconTag: (file?: string) => SafeString;
|
|
31
|
-
formFor(target: URLTarget, attrs: TagAttrs, content: string | SafeString)
|
|
31
|
+
formFor: (target: URLTarget, attrs: TagAttrs, content: string | SafeString) => SafeString;
|
|
32
32
|
htmlException: (error: Error) => Promise<boolean>;
|
|
33
33
|
htmlNotFound: () => Promise<boolean>;
|
|
34
34
|
httpException: (error: any) => Promise<boolean>;
|
|
@@ -42,7 +42,7 @@ export interface MojoContext extends Context {
|
|
|
42
42
|
radioButtonTag: (name: string, attrs?: TagAttrs) => Promise<SafeString>;
|
|
43
43
|
scriptTag: (target: string) => SafeString;
|
|
44
44
|
styleTag: (target: string) => SafeString;
|
|
45
|
-
submitButtonTag(text?: string, attrs?: TagAttrs)
|
|
45
|
+
submitButtonTag: (text?: string, attrs?: TagAttrs) => SafeString;
|
|
46
46
|
tag: (name: string, attrs?: TagAttrs, content?: string | SafeString) => SafeString;
|
|
47
47
|
textAreaTag: (name: string, attrs?: TagAttrs, content?: string | SafeString) => Promise<SafeString>;
|
|
48
48
|
textFieldTag: (name: string, attrs?: TagAttrs) => Promise<SafeString>;
|
|
@@ -147,7 +147,7 @@ export interface UserAgentRequestOptions extends SharedUserAgentRequestOptions {
|
|
|
147
147
|
ca?: string | string[] | Buffer | Buffer[];
|
|
148
148
|
body?: string | Buffer | NodeJS.ReadableStream;
|
|
149
149
|
form?: Record<string, string>;
|
|
150
|
-
formData?: Record<string,
|
|
150
|
+
formData?: Record<string, any>;
|
|
151
151
|
insecure?: boolean;
|
|
152
152
|
json?: JSONValue;
|
|
153
153
|
method?: string;
|