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

Add image methods #13

Merged
merged 1 commit into from
Apr 4, 2019
Merged

Conversation

fhammerschmidt
Copy link
Contributor

@fhammerschmidt fhammerschmidt commented Apr 3, 2019

If it's okay I will submit the same to bs-react-native.

src/Image.re Outdated
external abortPrefetch: requestId => unit = "abortPrefetch";

[@bs.module "react-native"] [@bs.scope "Image"]
external queryCache: (~urls: array(string)) => unit = "queryCache";
Copy link
Member

Choose a reason for hiding this comment

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

We should be consistent in whether we use uri or url. (Please also check what is used in other components/apis.)

src/Image.re Outdated

[@bs.module "react-native"] [@bs.scope "Image"]
external resolveAssetSource: Source.t => unit = "resolveAssetSource";
external resolveAssetSourceInt: int => unit = "resolveAssetSource";
Copy link
Member

Choose a reason for hiding this comment

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

These functions should actually return Source.t, not unit.

Copy link
Member

Choose a reason for hiding this comment

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

We probably don't need resolveAssetSource, it is basically identity, right?

And resolveAssetSourceInt should probably be

external resolveAssetSource: Packager.required => Source.t = "resolveAssetSource";

(and Source.fromRequired should be removed?)?

@fhammerschmidt fhammerschmidt force-pushed the feature/image-methods branch 3 times, most recently from 0c44ca6 to 2e5d0ab Compare April 4, 2019 09:13
@cknitt cknitt merged commit 041bae5 into cca-io:master Apr 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants