I defined a custom type:
type alias Props =
{ user: SafeUser
, onEdit: Signal.Address String
, products: List Product
, flash: String
}| https://gist.github.com/murphyrandle/ae9a3bccea188da066c7#file-error |
| var foo = { | |
| a: 'a', | |
| b: 'b' | |
| } | |
| foo.c = 'c' // Flow errors here saying: Property not found in object literal |
| { | |
| "vars": { | |
| "@gray-base": "#000", | |
| "@gray-darker": "lighten(@gray-base, 13.5%)", | |
| "@gray-dark": "lighten(@gray-base, 20%)", | |
| "@gray": "lighten(@gray-base, 33.5%)", | |
| "@gray-light": "lighten(@gray-base, 46.7%)", | |
| "@gray-lighter": "lighten(@gray-base, 93.5%)", | |
| "@brand-primary": "#82A6C9", | |
| "@brand-success": "#30D8B4", |
| module Main where | |
| import StartApp as StartApp | |
| import Task | |
| import Effects exposing (Never, Effects) | |
| import History | |
| import Signal | |
| import Html exposing (Html, text) | |
| import Debug | |
| import Time |
I defined a custom type:
type alias Props =
{ user: SafeUser
, onEdit: Signal.Address String
, products: List Product
, flash: String
}| module Dnd (..) where | |
| import Html exposing (..) | |
| import Html.Attributes exposing (..) | |
| import Html.Events exposing (..) | |
| import StartApp.Simple exposing (start) | |
| import Signal exposing (message, Address) | |
| import Json.Decode | |
| module FancyParse (..) where | |
| import Html exposing (div, text) | |
| import Json.Decode exposing (object2, string, (:=), value, customDecoder, Decoder, decodeString) | |
| type alias Foo = | |
| { a : String | |
| , json : String | |
| } |
| module Inversions (countInversions, mergeAndCount) where | |
| import List.Extra exposing (splitAt) | |
| import List exposing (length, sort, foldl, concat, head) | |
| import Maybe.Extra exposing (isNothing, map2) | |
| mergeAndCount : List Int -> List Int -> ( List Int, Int ) | |
| mergeAndCount left right = | |
| let |
| # Requires siver-searcher to be installed | |
| FILES=$(ag "<search term here, can be regex>" -l --js) | |
| for i in $FILES; do | |
| echo -e "<stuff to prepend here>\n$(cat $i)" > $i | |
| done |
| import Html exposing (text) | |
| import Json.Decode exposing (Decoder, decodeString, list, int) | |
| -- Define a "recipe" (decoder) | |
| -- Execute the recipe (decoder) | |
| -- Result x a = Err x | Ok a | |
| num = "4" | |
| nums = "[1,3,5,6,7]" |