Skip to content

jensarps/fetch-types

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
IDL
 
 
 
 
 
 
 
 

About

The definitions for Fetch API in JavaScript using JSDoc for Code Completion and Type Hinting in your editor of choice, taken from the Web IDL definitions in the spec (as of Nov 26, 2015).

Usage

Clone / download this repository, or just download the FetchAPI.js file. Then tell your editor / IDE to treat the FetchAPI.js file as a library.

A detailed instruction can be found in this post.

Issues/Questions/ToDos

String Types

It might be a good idea to replace usages of USVString and ByteString with string to avoid confusion.

Read-Only Members

The only way in JSDoc to document read-only members that I know of is the @const tag, but that feels off to do that in many cases.

The Body Mixin

Well, the Body mixin is not exposed. I have no clue how to document something like this in JSDoc.

Do this work automatically

Really, it would be great if there was a tool that would automatically generate JavaScript files from IDL definitions.

Notes

  1. To document what Promises will resolve to, I use this notation: {Promise<Type>}.
  2. To document what Iterators will iterate, I use this notation: {Iterator.<Type>}.

The WebStorm IDE works well with those, but I don't know if others will understand it correctly.

About

The Fetch API Definitions in JS & JSDoc

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published