-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fddcfa4
commit 2388235
Showing
6 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
export default Cajax; | ||
declare class Cajax { | ||
static post(url: any, data?: {}, options?: {}): CajaxRequest; | ||
static get(url: any, data?: {}, options?: {}): CajaxRequest; | ||
static put(url: any, data?: {}, options?: {}): CajaxRequest; | ||
static delete(url: any, data?: {}, options?: {}): CajaxRequest; | ||
static trace(url: any, data?: {}, options?: {}): CajaxRequest; | ||
static connect(url: any, data?: {}, options?: {}): CajaxRequest; | ||
static options(url: any, data?: {}, options?: {}): CajaxRequest; | ||
static update(url: any, data?: {}, options?: {}): CajaxRequest; | ||
static ajax(json: any): CajaxRequest; | ||
} | ||
import CajaxRequest from "./CajaxRequest.js"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
export default CajaxRequest; | ||
declare class CajaxRequest { | ||
constructor(url: any, method: any, data?: any, options?: {}); | ||
onResponseFunction: () => void; | ||
catchFunction: () => void; | ||
thenFunction: () => void; | ||
params: any; | ||
method: any; | ||
url: any; | ||
fetch: Promise<void>; | ||
options: {}; | ||
data: string | FormData; | ||
contenttype: string; | ||
xhr: XMLHttpRequest; | ||
response(func: any): CajaxRequest; | ||
then(func: any): CajaxRequest; | ||
progress(func: any): CajaxRequest; | ||
catch(func: any): CajaxRequest; | ||
custom(func: any): CajaxRequest; | ||
contentType(type: any): CajaxRequest; | ||
send(): CajaxRequest; | ||
} | ||
declare namespace CajaxRequest { | ||
const useFetch: boolean; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export default interface CajaxResponse { | ||
resType: string; | ||
response: string; | ||
responseText: string; | ||
ok: Boolean; | ||
status: Number; | ||
statusText: string; | ||
url: string; | ||
res: any; | ||
json(): object; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export default class Prajax { | ||
static post(url: any, data?: {}, options?: {}): any; | ||
static get(url: any, data?: {}, options?: {}): any; | ||
static put(url: any, data?: {}, options?: {}): any; | ||
static delete(url: any, data?: {}, options?: {}): any; | ||
static trace(url: any, data?: {}, options?: {}): any; | ||
static connect(url: any, data?: {}, options?: {}): any; | ||
static options(url: any, data?: {}, options?: {}): any; | ||
static update(url: any, data?: {}, options?: {}): any; | ||
static ajax(json: any): any; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
export default PrajaxClient; | ||
declare class PrajaxClient { | ||
constructor(options: any); | ||
baseUrl: any; | ||
options(url: any, data?: {}, options?: {}): any; | ||
data: any; | ||
get(url: any, data?: {}, options?: {}): any; | ||
post(url: any, data?: {}, options?: {}): any; | ||
put(url: any, data?: {}, options?: {}): any; | ||
delete(url: any, data?: {}, options?: {}): any; | ||
trace(url: any, data?: {}, options?: {}): any; | ||
connect(url: any, data?: {}, options?: {}): any; | ||
update(url: any, data?: {}, options?: {}): any; | ||
ajax(json: any): any; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export default PrajaxPromise; | ||
declare function PrajaxPromise(url: any, method: any, data?: any, options?: {}): any; |