Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/redux-logger

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/redux-logger

TypeScript definitions for redux-logger

  • 3.0.13
  • ts4.6
  • ts4.7
  • ts4.8
  • ts4.9
  • ts5.0
  • ts5.1
  • ts5.2
  • ts5.3
  • ts5.4
  • ts5.5
  • ts5.6
  • ts5.7
  • ts5.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
298K
decreased by-4.17%
Maintainers
1
Weekly downloads
 
Created
Source

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.

FAQs

Package last updated on 25 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc