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
//@flow | |
declare function deepSeq<P>( | |
...path: P | |
): $TupleMap<P, <T, Prop>(prop: Prop) => T => $ElementType<T, Prop>> | |
declare var pipe: $ComposeReverse | |
const target: 'target' = 'target' |
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
export function Do(generatorFunction) { | |
const generator = generatorFunction() | |
return function next(error, v) { | |
const res = generator.next(v) | |
if (res.done) | |
return res.value | |
else |
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
declare module 'redux-act' { | |
/** | |
* Single "action" as it referenced from classic redux | |
* @typedef {{ type: string, payload: P }} Act.<P> | |
* @template P | |
*/ | |
declare export | |
type Act</*::+*/P = mixed> = { |
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
declare module 'fs-extra' { | |
import type { | |
createReadStream as createReadStreamType, | |
createWriteStream as createWriteStreamType, | |
} from 'fs' | |
declare export var createReadStream: $PropertyType< | |
$Exports<'fs'>, | |
'createReadStream', | |
> |
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 {Stream, fromPromise} from 'most' | |
import {message, effect, Effect, Message} from 'effector' | |
type State = { | |
currentUser: number, | |
} | |
/** | |
* Plain async function | |
*/ |
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
[options] | |
module.name_mapper='^most-subject$' -> '<PROJECT_ROOT>/most-subject' |
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
//@flow | |
export type SeedValue<S, V> = { | |
seed: S, | |
value: V, | |
} | |
export type TimeValue<V> = { | |
/*::+*/time: number, | |
/*::+*/value: V | |
} |
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
//@flow | |
import type {Stream} from 'most' | |
function intoAsync<T>(str: Stream<T>): $AsyncIterable<T, void, any> { | |
let isEnd = false | |
let ask: Array<Dispose<T>> = [] | |
let tell: Array<T> = [] | |
const end = str.observe(t => { | |
if (ask.length > 0) { |
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
//@flow | |
import { | |
ping, | |
submitLogin, | |
requestAuth, | |
showNotification, | |
} from './events' | |
import type {State} from './state' |
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
parser: babel-eslint | |
parserOptions: | |
ecmaVersion: 8 | |
ecmaFeatures: | |
experimentalObjectRestSpread: true | |
extends: | |
- 'plugin:flowtype/recommended' | |
plugins: | |
- babel | |
- flowtype |