fission-codes / webnative-elm

Thin wrapper around webnative for Elm.
https://package.elm-lang.org/packages/fission-suite/webnative-elm/latest/
Apache License 2.0
13 stars 2 forks source link

Merge webnativeRequest and wnfsRequest into one port #3

Closed matheus23 closed 3 years ago

matheus23 commented 3 years ago

At the moment you have to define both these ports:

port webnativeRequest : Webnative.Request -> Cmd msg
port wnfsRequest : Webnative.Request -> Cmd msg

Since they share the same type, you can mix them up. Doing so will lead to a runtime error.

Proposed change: Wrap the Webnative.Request type with another custom type / add a field to it to indicate what the intended action is.

icidasset commented 3 years ago

Implemented in v2