on 5d536d1 help sign in
elk/libraries/JavaScript.elm
43 lines 1.3 kB history raw
2module JavaScript where
5-- To Elm
7toString : JSString -> String
9-- Requires that the input array be uniform (all members have the same type)
10toList : JSArray a -> [a]
12toInt : JSNumber -> Int
13toFloat : JSNumber -> Float
15-- Conversion from JavaScript boolean values to Elm boolean values.
16toBool : JSBool -> Bool
19-- From Elm
21fromString : String -> JSString
23-- Produces a uniform JavaScript array with all members of the same type.
24fromList : [a] -> JSArray a
26fromInt : Int -> JSNumber
27fromFloat : Float -> JSNumber
29-- Conversion from Elm boolean values to JavaScript boolean values.
30fromBool : Bool -> JSBool
32{-- TODO: only found in docs
34 , ("castTupleToJSTuple2" , "(a,b) -> JSTuple2 a b", "A JSTupleN is an array of size N with nonuniform types. Each member can have a different type.")
35 , ("castJSTupleToTuple2" , "JSTuple2 a b -> (a,b)", "")
36 , ("castTupleToJSTuple3" , "(a,b,c) -> JSTuple3 a b c", "")
37 , ("castJSTupleToTuple3" , "JSTuple3 a b c > (a,b,c)", "")
38 , ("castTupleToJSTuple4" , "(a,b,c,d) -> JSTuple4 a b c d", "")
39 , ("castJSTupleToTuple4" , "JSTuple4 a b c d -> (a,b,c,d)", "")
40 , ("castTupleToJSTuple5" , "(a,b,c,d,e) -> JSTuple5 a b c d e", "")
41 , ("castJSTupleToTuple5" , "JSTuple5 a b c d e -> (a,b,c,d,e)", "")
43--}