Skip to content

Instantly share code, notes, and snippets.

@undeadcat
Created April 21, 2017 10:35
Show Gist options
  • Save undeadcat/cdeb9d4d9299ca1c144d572f702c613c to your computer and use it in GitHub Desktop.
Save undeadcat/cdeb9d4d9299ca1c144d572f702c613c to your computer and use it in GitHub Desktop.
/**
* @returns {{foo:number, bar:number}}
*/
function returnsFoobar() {
}
/**
@param p {number}
*/
function acceptsNumber(p) {
}
acceptsNumber();
acceptsNumber("foobar");
acceptsNumber(returnsFoobar().foo);
acceptsNumber(returnsFoobar().baz);
returnsFoobar()//completion here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment