@types/redux-logger
TypeScript definitions for redux-logger
Last updated 2 years ago by types .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @types/redux-logger 
SYNC missed versions from official npm registry.

Installation

npm install --save @types/redux-logger

Summary

This package contains type definitions for redux-logger (https://github.com/theaqua/redux-logger).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/redux-logger.

index.d.ts

export as namespace ReduxLogger;

import * as Redux from "redux";

export const logger: Redux.Middleware;

export type LoggerPredicate = (
    getState: () => any,
    action: any,
    logEntry?: LogEntryObject,
) => boolean;

export type StateToString = (state: any) => string;
export type ActionToString = (action: any) => string;
export type ErrorToString = (error: any, prevState: any) => string;

export interface ColorsObject {
    title?: boolean | ActionToString | undefined;
    prevState?: boolean | StateToString | undefined;
    action?: boolean | ActionToString | undefined;
    nextState?: boolean | StateToString | undefined;
    error?: boolean | ErrorToString | undefined;
}

export interface LevelObject {
    prevState?: string | boolean | StateToString | undefined;
    action?: string | boolean | ActionToString | undefined;
    nextState?: string | boolean | StateToString | undefined;
    error?: string | boolean | ErrorToString | undefined;
}

export interface LogEntryObject {
    action?: string | boolean | ActionToString | undefined;
    started?: number | undefined;
    startedTime?: Date | undefined;
    took?: number | undefined;
    error?(error: any): any;
    nextState?(state: any): any;
    prevState?(state: any): any;
}

export interface ReduxLoggerOptions {
    level?: string | ActionToString | LevelObject | undefined;
    duration?: boolean | undefined;
    timestamp?: boolean | undefined;
    colors?: ColorsObject | false | undefined;
    titleFormatter?(formattedAction: any, formattedTime: string, took: number): string;
    logger?: any;
    logErrors?: boolean | undefined;
    collapsed?: boolean | LoggerPredicate | undefined;
    predicate?: LoggerPredicate | undefined;
    diff?: boolean | undefined;
    diffPredicate?: LoggerPredicate | undefined;
    stateTransformer?(state: any): any;
    actionTransformer?(action: any): any;
    errorTransformer?(error: any): any;
}

export function createLogger(options?: ReduxLoggerOptions): Redux.Middleware;

export default logger;

Additional Details

  • Last updated: Thu, 25 Jan 2024 21:06:38 GMT
  • Dependencies: redux

Credits

These definitions were written by Alexander Rusakov, and Kevin Groat.

Current Tags

  • 3.0.13                                ...           latest (2 years ago)
  • 3.0.7                                ...           ts2.0 (7 years ago)
  • 3.0.7                                ...           ts2.1 (7 years ago)
  • 3.0.7                                ...           ts2.2 (7 years ago)
  • 3.0.7                                ...           ts2.3 (7 years ago)
  • 3.0.7                                ...           ts2.4 (7 years ago)
  • 3.0.7                                ...           ts2.5 (7 years ago)
  • 3.0.7                                ...           ts2.6 (7 years ago)
  • 3.0.7                                ...           ts2.7 (7 years ago)
  • 3.0.7                                ...           ts2.8 (7 years ago)
  • 3.0.7                                ...           ts2.9 (7 years ago)
  • 3.0.8                                ...           ts3.0 (6 years ago)
  • 3.0.8                                ...           ts3.1 (6 years ago)
  • 3.0.8                                ...           ts3.2 (6 years ago)
  • 3.0.8                                ...           ts3.3 (6 years ago)
  • 3.0.8                                ...           ts3.4 (6 years ago)
  • 3.0.8                                ...           ts3.5 (6 years ago)
  • 3.0.9                                ...           ts3.6 (5 years ago)
  • 3.0.9                                ...           ts3.7 (5 years ago)
  • 3.0.9                                ...           ts3.8 (5 years ago)
  • 3.0.9                                ...           ts3.9 (5 years ago)
  • 3.0.9                                ...           ts4.0 (5 years ago)
  • 3.0.9                                ...           ts4.1 (5 years ago)
  • 3.0.9                                ...           ts4.2 (5 years ago)
  • 3.0.9                                ...           ts4.3 (5 years ago)
  • 3.0.9                                ...           ts4.4 (5 years ago)
  • 3.0.12                                ...           ts4.5 (2 years ago)
  • 3.0.13                                ...           ts4.6 (2 years ago)
  • 3.0.13                                ...           ts4.7 (2 years ago)
  • 3.0.13                                ...           ts4.8 (2 years ago)
  • 3.0.13                                ...           ts4.9 (2 years ago)
  • 3.0.13                                ...           ts5.0 (2 years ago)
  • 3.0.13                                ...           ts5.1 (2 years ago)
  • 3.0.13                                ...           ts5.2 (2 years ago)
  • 3.0.13                                ...           ts5.3 (2 years ago)
  • 3.0.13                                ...           ts5.4 (2 years ago)
  • 3.0.13                                ...           ts5.5 (2 years ago)
  • 3.0.13                                ...           ts5.6 (2 years ago)
  • 3.0.13                                ...           ts5.7 (2 years ago)
  • 3.0.13                                ...           ts5.8 (2 years ago)
  • 3.0.13                                ...           ts5.9 (2 years ago)
  • 3.0.13                                ...           ts6.0 (2 years ago)

31 Versions

  • 3.0.13                                ...           2 years ago
  • 3.0.12                                ...           2 years ago
  • 3.0.11                                ...           2 years ago
  • 3.0.10                                ...           3 years ago
  • 3.0.9                                ...           5 years ago
  • 3.0.8                                ...           6 years ago
  • 3.0.7                                ...           7 years ago
  • 3.0.6                                ...           8 years ago
  • 3.0.5                                ...           8 years ago
  • 3.0.4                                ...           9 years ago
  • 3.0.3                                ...           9 years ago
  • 3.0.2                                ...           9 years ago
  • 3.0.1                                ...           9 years ago
  • 3.0.0                                ...           9 years ago
  • 2.10.0                                ...           9 years ago
  • 2.6.34                                ...           9 years ago
  • 2.6.33                                ...           9 years ago
  • 2.6.32                                ...           10 years ago
  • 2.6.31                                ...           10 years ago
  • 2.6.30                                ...           10 years ago
  • 2.6.29                                ...           10 years ago
  • 2.6.28                                ...           10 years ago
  • 2.6.27-alpha                                ...           10 years ago
  • 2.6.25-alpha                                ...           10 years ago
  • 2.6.24-alpha                                ...           10 years ago
  • 2.6.23-alpha                                ...           10 years ago
  • 2.6.22-alpha                                ...           10 years ago
  • 2.6.21-alpha                                ...           10 years ago
  • 2.6.20-alpha                                ...           10 years ago
  • 2.6.15-alpha                                ...           10 years ago
  • 2.6.14-alpha                                ...           10 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (1)
Dev Dependencies (0)
None

Copyright 2013 - present © cnpmjs.org | Home |