mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Added functionality
This commit is contained in:
+23
-3
@@ -1,7 +1,8 @@
|
||||
/// <reference path="reflux.d.ts" />
|
||||
import Reflux = require("reflux");
|
||||
import React = require("react");
|
||||
|
||||
|
||||
var Reflux: RefluxCore;
|
||||
//var Reflux: RefluxCore;
|
||||
//var React: React;
|
||||
|
||||
var syncActions = Reflux.createActions([
|
||||
"statusUpdate",
|
||||
@@ -37,3 +38,22 @@ var statusStore = Reflux.createStore({
|
||||
this.trigger(status);
|
||||
}
|
||||
});
|
||||
|
||||
Reflux.createAction({
|
||||
children: ["progressed", "completed", "failed"]
|
||||
});
|
||||
|
||||
|
||||
var actions = Reflux.createActions(["fireBall", "magicMissile"]);
|
||||
|
||||
var Store = Reflux.createStore({
|
||||
init: function () {
|
||||
this.listenToMany(actions);
|
||||
},
|
||||
onFireBall: function () {
|
||||
// whoooosh!
|
||||
},
|
||||
onMagicMissile: function () {
|
||||
// bzzzzapp!
|
||||
}
|
||||
});
|
||||
|
||||
Vendored
+5
@@ -47,8 +47,13 @@ declare module RefluxCore {
|
||||
|
||||
function createStore(definition: StoreDefinition): Store;
|
||||
|
||||
function createAction(definition: ActionsDefinition): any;
|
||||
|
||||
function createActions(definition: ActionsDefinition): any;
|
||||
function createActions(definitions: string[]): any;
|
||||
|
||||
function listenTo(store: Store, handler: string);
|
||||
function setState(state: any);
|
||||
}
|
||||
|
||||
declare module "reflux" {
|
||||
|
||||
Reference in New Issue
Block a user