6.4.6 • Published 6 months ago

@types/reflux v6.4.6

Weekly downloads
5,018
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/reflux

Summary

This package contains type definitions for RefluxJS (https://github.com/reflux/refluxjs).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/reflux/v0.

index.d.ts

// Type definitions for RefluxJS 0.4
// Project: https://github.com/reflux/refluxjs
// Definitions by: Maurice de Beijer <https://github.com/mauricedb>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

export as namespace Reflux;

export interface StoreDefinition {
    listenables?: any[] | undefined;
    init?: Function | undefined;
    getInitialState?: Function | undefined;
    [propertyName: string]: any;
}

export interface ListenFn {
    (...params: any[]): any;
    completed: Function;
    failed: Function;
}
export interface Listenable {
    listen: ListenFn;
}

export interface Subscription {
    stop: Function;
    listenable: Listenable;
}

export interface Store {
    hasListener(listenable: Listenable): boolean;
    listenToMany(listenables: Listenable[]): void;
    validateListening(listenable: Listenable): string;
    listenTo(listenable: Listenable, callback: Function, defaultCallback?: Function): Subscription;
    stopListeningTo(listenable: Listenable): boolean;
    stopListeningToAll(): void;
    fetchInitialState(listenable: Listenable, defaultCallback: Function): void;
    trigger(state: any): void;
    listen(callback: Function, bindContext: any): Function;
}

export interface ActionsDefinition {
    [index: string]: any;
}

export interface Actions {
    [index: string]: Listenable;
}

export function createStore(definition: StoreDefinition): Store;

export function createAction(definition?: ActionsDefinition): any;

export function createActions(definitions: ActionsDefinition | string[]): any;

export function connect(store: Store, key?: string): void;
export function listenTo(store: Store, handler: string): void;
export function setState(state: any): void;

export function ListenerMixin(): any;

Additional Details

  • Last updated: Thu, 08 Jul 2021 22:41:56 GMT
  • Dependencies: none
  • Global values: Reflux

Credits

These definitions were written by Maurice de Beijer.

6.4.5

7 months ago

6.4.4

7 months ago

6.4.6

6 months ago

0.4.5

6 months ago

0.4.4

7 months ago

6.4.3

3 years ago

0.4.3

3 years ago

6.4.2

5 years ago

6.4.1

6 years ago

6.4.0

6 years ago

0.4.2

6 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.0.30

8 years ago

0.0.29

8 years ago

0.0.28

8 years ago

0.0.27

8 years ago

0.0.26

8 years ago

0.0.25-alpha

8 years ago

0.0.24-alpha

8 years ago

0.0.23-alpha

8 years ago

0.0.22-alpha

8 years ago

0.0.21-alpha

8 years ago

0.0.20-alpha

8 years ago

0.0.19-alpha

8 years ago

0.0.14-alpha

8 years ago

0.0.13-alpha

8 years ago