Skip to content

Instantly share code, notes, and snippets.

@TomiS
TomiS / redux-saga_v0.15.x.js
Last active November 17, 2017 10:54
Redux-saga flow types for version 0.15.x
/**
* Shared interfaces between the modules 'redux-saga' and
* 'redux-saga/effects'
*/
declare interface $npm$ReduxSaga$Channel {
take: (cb: (msg: mixed) => void) => void,
put: (msg: mixed) => void,
close: Function,
}
//This is an untested code snippet. Read it as pseudo code
// CONTROLLER (in PHP)
...
//Helper function for creating a form
private function prepare_my_form($namespace)
{
$form = midgardmvc_helper_forms::create($namespace);
if ($namespace == 'create_form')