This file contains 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 {Action, ActionCreator, Dispatch} from 'redux'; | |
import {ThunkAction} from 'redux-thunk'; | |
// Redux action | |
const reduxAction: ActionCreator<Action> = (text: string) => { | |
return { | |
type: SET_TEXT, | |
text | |
}; | |
}; |
This file contains 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
""" | |
Simple xml serializer. | |
@author Reimund Trost 2013 | |
Example: | |
mydict = { | |
'name': 'The Andersson\'s', | |
'size': 4, |
This file contains 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
// Cross-browser object.watch and object.unwatch | |
// Requires Mootools 1.4 or greater | |
// object.watch | |
(function(){ | |
if (!Object.prototype.watch) { | |
Object.implement('watch',function(prop,handler){ | |
var oldval = this[prop], newval = oldval, | |
getter = function () { | |
return newval; |