/* @flow */
type BaseProps = {
commonProp1: number,
commonProp2: string,
}
type Type1Props = BaseProps & {
type: 'type1',
extraProp1: boolean,
}
type Type2Props = BaseProps & {
type: 'type2',
extraProp2: number,
}
type Type = Type1Props | Type2Props;
function dealWithType1({...
27 июль 2017, в 18:12