-
-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #136 from xg-wang/ts
TypeScript support
- Loading branch information
Showing
18 changed files
with
871 additions
and
255 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
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
This file was deleted.
Oops, something went wrong.
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,14 @@ | ||
|
||
import fetch from 'fetch'; | ||
|
||
export default function ajax( | ||
input: RequestInfo, | ||
init?: RequestInit | ||
): Promise<Response> { | ||
return fetch(input, init).then(response => { | ||
if (response.ok) { | ||
return response.json(); | ||
} | ||
throw response; | ||
}) | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.