Module

Pha.Events.Decoder

Package
purescript-pha
Repository
gbagan/purescript-pha

#Decoder Source

type Decoder a = Foreign -> F a

#always Source

always :: forall msg a. msg -> a -> F msg

#Rectangle Source

type Rectangle = { height :: Number, left :: Number, top :: Number, width :: Number }

Re-exports from Foreign

#readString Source

readString :: Foreign -> F String

Attempt to coerce a foreign value to a String.

#readNumber Source

readNumber :: Foreign -> F Number

Attempt to coerce a foreign value to a Number.

#readInt Source

readInt :: Foreign -> F Int

Attempt to coerce a foreign value to an Int.

#readBoolean Source

readBoolean :: Foreign -> F Boolean

Attempt to coerce a foreign value to a Boolean.

Re-exports from Foreign.Index

#readProp Source

readProp :: String -> Foreign -> F Foreign

Attempt to read a value from a foreign value property