Skip to content
This repository has been archived by the owner on Aug 15, 2019. It is now read-only.

use the env.global for looking up fetch method #1544

Merged
merged 6 commits into from Mar 18, 2019
Merged

Conversation

pyu10055
Copy link
Collaborator

@pyu10055 pyu10055 commented Feb 5, 2019

we have expose the global namespace in the ENV, the PR uses that to help fetch method lookup for different platforms.


This change is Reviewable

Copy link
Contributor

@dsmilkov dsmilkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 1 approvals obtained (waiting on @dsmilkov and @pyu10055)


src/io/browser_http.ts, line 34 at r1 (raw file):

const OCTET_STREAM_MIME_TYPE = 'application/octet-stream';
const JSON_TYPE = 'application/json';
export type GlobalWithFetch = {

instead of adding this type, make ENV.global be of type any (which it effectively s), so you don't have to cast it here and elsewhere.

Copy link
Collaborator Author

@pyu10055 pyu10055 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 1 approvals obtained (waiting on @dsmilkov)


src/io/browser_http.ts, line 34 at r1 (raw file):

Previously, dsmilkov (Daniel Smilkov) wrote…

instead of adding this type, make ENV.global be of type any (which it effectively s), so you don't have to cast it here and elsewhere.

thanks

Copy link
Contributor

@dsmilkov dsmilkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 of 2 files at r2.
Reviewable status: :shipit: complete! 1 of 1 approvals obtained


src/io/browser_http.ts, line 34 at r1 (raw file):

Previously, pyu10055 (Ping Yu) wrote…

thanks

Great!

@pyu10055 pyu10055 merged commit a470087 into master Mar 18, 2019
@pyu10055 pyu10055 deleted the namespace_for_fetch branch March 18, 2019 03:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants