Fixed test errors

This commit is contained in:
Maurice de Beijer
2015-10-17 21:15:47 +02:00
parent e5109ed291
commit 1a105463c5
2 changed files with 7 additions and 7 deletions

View File

@@ -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
View File

@@ -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" {