Installation
npm install --save @types/fluxxor
Summary
This package contains type definitions for fluxxor (https://github.com/BinaryMuse/fluxxor).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fluxxor.
index.d.ts
import * as EventEmitter3 from "eventemitter3";
import * as React from "react";
declare namespace Fluxxor {
class Dispatcher {
constructor(stores: any);
addStore(name: string, store: Store): void;
dispatch(action: Function): void;
doDispatchLoop(action: Function): void;
waitForStores(store: Store, stores: string[], fn: Function): void;
}
class Flux extends EventEmitter3.EventEmitter {
constructor(stores: any, actions: any);
addActions(actions: any): void;
addAction(...args: Array<string | Function>): void;
addAction(names: string[], action: Function): void;
store(name: string): any;
addStore(name: string, store: Store): void;
addStores(stores: any): void;
stores: any;
actions: any;
}
interface Store extends EventEmitter3.EventEmitter {
bindActions(...args: Array<string | Function>): void;
bindActions(args: Array<string | Function>): void;
waitFor(stores: string[], fn: Function): void;
}
interface StoreSpec {
initialize?(instance?: any, options?: {}): void;
actions?: any;
}
interface StoreClass {
new(options?: {}): any;
}
interface Context {
flux: Flux;
}
interface FluxMixin {
getFlux(): Flux;
}
interface FluxChildMixin {
getFlux(): Flux;
}
interface StoreWatchMixin<StoreState> {
getStateFromFlux(): StoreState;
}
function FluxMixin(react: typeof React): FluxMixin;
function FluxChildMixin(react: typeof React): FluxChildMixin;
function StoreWatchMixin<StoreState>(...storeNames: string[]): StoreWatchMixin<StoreState>;
function createStore(spec: StoreSpec): StoreClass;
var version: string;
}
export = Fluxxor;
export as namespace Fluxxor;
Additional Details
- Last updated: Tue, 07 Nov 2023 03:09:37 GMT
- Dependencies: @types/react, eventemitter3
Credits
These definitions were written by Yuichi Murata.