mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-01 09:01:45 +08:00
Fixed test errors
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
/// <reference path="reflux.d.ts" />
|
||||
/// <reference path="../react/react.d.ts" />
|
||||
|
||||
import Reflux = require("reflux");
|
||||
import React = require("react");
|
||||
|
||||
//var Reflux: RefluxCore;
|
||||
//var React: React;
|
||||
|
||||
var syncActions = Reflux.createActions([
|
||||
"statusUpdate",
|
||||
"statusEdited",
|
||||
@@ -31,7 +31,7 @@ var statusStore = Reflux.createStore({
|
||||
this.listenTo(asyncActions.fireBall, this.onFireBall);
|
||||
},
|
||||
// Callback
|
||||
onFireBall: function (flag) {
|
||||
onFireBall: function (flag: boolean) {
|
||||
var status = flag ? 'ONLINE' : 'OFFLINE';
|
||||
|
||||
// Pass on to listeners
|
||||
|
||||
6
reflux/reflux.d.ts
vendored
6
reflux/reflux.d.ts
vendored
@@ -34,7 +34,7 @@ declare module RefluxCore {
|
||||
stopListeningTo(listenable: Listenable): boolean,
|
||||
stopListeningToAll(): void,
|
||||
fetchInitialState(listenable: Listenable, defaultCallback: Function): void,
|
||||
trigger(state: any)
|
||||
trigger(state: any):void;
|
||||
}
|
||||
|
||||
interface ActionsDefinition {
|
||||
@@ -52,8 +52,8 @@ declare module RefluxCore {
|
||||
function createActions(definition: ActionsDefinition): any;
|
||||
function createActions(definitions: string[]): any;
|
||||
|
||||
function listenTo(store: Store, handler: string);
|
||||
function setState(state: any);
|
||||
function listenTo(store: Store, handler: string):void;
|
||||
function setState(state: any):void;
|
||||
}
|
||||
|
||||
declare module "reflux" {
|
||||
|
||||
Reference in New Issue
Block a user