This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * This type should be used to generate the Algebraic Data Types | |
| * in typescript. | |
| * */ | |
| export type Variant<Kind, Shape> = Readonly<{ kind: Kind } & Shape> | |
| // eslint-disable-next-line @typescript-eslint/ban-types | |
| export type EmptyVariant<Kind> = Variant<Kind, {}> | |
| /** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns overweight.core) | |
| (def animals | |
| [{:type :cat | |
| :name "Tom" | |
| :weight 3} | |
| {:type :dog | |
| :breed :boxer | |
| :weight 12} | |
| {:type :cat |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns overweight.core) | |
| (def animals | |
| [{:type :cat | |
| :name "Tom" | |
| :weight 3} | |
| {:type :dog | |
| :breed :boxer | |
| :weight 12} | |
| {:type :cat |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { PropTypes } from "react"; | |
| import IPropTypes from "react-immutable-proptypes"; | |
| import composeEnhances from "recompose/compose"; | |
| import setDisplayName from "recompose/setDisplayName"; | |
| import setPropTypes from "recompose/setPropTypes"; | |
| import onlyUpdateForPropTypes from "recompose/onlyUpdateForPropTypes"; | |
| import { connect } from "react-redux"; |