Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First argument to fetch is optional, but fetch requires at least 1 arg #25509

Closed
JakeTunaley opened this issue Jul 8, 2018 · 0 comments
Closed
Assignees
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Fixed A PR has been merged for this issue Help Wanted You can do this

Comments

@JakeTunaley
Copy link

TypeScript Version: 3.0.0-dev.20180707

Search Terms: fetch lib

Code

fetch();

Expected behavior:

An error: Expected 1 arguments, but got 0.

Actual behavior:

No errors are emitted. This is non-compliant with the fetch spec, wherein only the second argument is optional.

Playground Link: http://www.typescriptlang.org/play/index.html#src=fetch()%3B

@DanielRosenwasser DanielRosenwasser added Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript labels Jul 8, 2018
@mhegazy mhegazy added this to the Community milestone Jul 9, 2018
@mhegazy mhegazy added Help Wanted You can do this Fixed in TSJS repo Fix merged in https://github.com/Microsoft/TSJS-lib-generator, but not ported yet labels Jul 9, 2018
@mhegazy mhegazy self-assigned this Jul 9, 2018
@mhegazy mhegazy modified the milestones: Community, TypeScript 3.1 Jul 9, 2018
@mhegazy mhegazy added Fixed A PR has been merged for this issue and removed Fixed A PR has been merged for this issue labels Jul 25, 2018
@mhegazy mhegazy removed the Fixed in TSJS repo Fix merged in https://github.com/Microsoft/TSJS-lib-generator, but not ported yet label Jul 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Fixed A PR has been merged for this issue Help Wanted You can do this
Projects
None yet
Development

No branches or pull requests

3 participants