@types/raven

  • Version 2.5.7
  • Published
  • 9.28 kB
  • 1 dependency
  • MIT license

Install

npm i @types/raven
yarn add @types/raven
pnpm add @types/raven

Overview

TypeScript definitions for raven

Index

Variables

variable version

const version: string;

    Functions

    function captureBreadcrumb

    captureBreadcrumb: (breadcrumb: any) => void;

      function captureException

      captureException: {
      (e: Error, cb?: CaptureCallback): string;
      (e: Error, options?: CaptureOptions, cb?: CaptureCallback): string;
      };

        function captureMessage

        captureMessage: {
        (message: string, cb?: CaptureCallback): string;
        (message: string, options?: CaptureOptions, cb?: CaptureCallback): string;
        };

          function config

          config: {
          (options?: ConstructorOptions): Client;
          (dsn?: string | false, options?: ConstructorOptions): Client;
          };

            function context

            context: { <T>(ctx: any, func: () => T): T; <T>(func: () => T): T };

              function disableConsoleAlerts

              disableConsoleAlerts: () => void;

                function errorHandler

                errorHandler: () => (
                e: Error,
                req: IncomingMessage,
                res: ServerResponse,
                next: () => void
                ) => void;

                  function getContext

                  getContext: () => any;

                    function install

                    install: (cb?: FatalErrorCallback) => Client;

                      function interceptErr

                      interceptErr: (ctx: any) => Client;

                        function mergeContext

                        mergeContext: (ctx: any) => Client;

                          function requestHandler

                          requestHandler: () => (
                          req: IncomingMessage,
                          res: ServerResponse,
                          next: () => void
                          ) => void;

                            function setContext

                            setContext: (ctx: any) => Client;

                              function setDataCallback

                              setDataCallback: (fn: DataCallback) => Client;

                                function setShouldSendCallback

                                setShouldSendCallback: (fn: ShouldSendCallback) => Client;

                                  function uninstall

                                  uninstall: () => Client;

                                    function wrap

                                    wrap: { <T>(func: () => T): () => T; <T>(options: any, func: () => T): () => T };

                                      Classes

                                      class Client

                                      class Client extends EventEmitter {}

                                        constructor

                                        constructor(options?: ConstructorOptions);

                                          constructor

                                          constructor(dsn?: string | false, options?: ConstructorOptions);

                                            method captureBreadcrumb

                                            captureBreadcrumb: (breadcrumb: any) => void;

                                              method captureException

                                              captureException: {
                                              (error: Error, cb?: CaptureCallback): string;
                                              (error: Error, options?: CaptureOptions, cb?: CaptureCallback): string;
                                              };

                                                method captureMessage

                                                captureMessage: {
                                                (message: string, cb?: CaptureCallback): string;
                                                (message: string, options?: CaptureOptions, cb?: CaptureCallback): string;
                                                };

                                                  method config

                                                  config: {
                                                  (options?: ConstructorOptions): this;
                                                  (dsn?: string | false, options?: ConstructorOptions): this;
                                                  };

                                                    method context

                                                    context: { <T>(ctx: any, func: () => T): T; <T>(func: () => T): T };

                                                      method errorHandler

                                                      errorHandler: () => (
                                                      e: Error,
                                                      req: IncomingMessage,
                                                      res: ServerResponse,
                                                      next: () => void
                                                      ) => void;

                                                        method getContext

                                                        getContext: () => any;

                                                          method install

                                                          install: (cb?: FatalErrorCallback) => this;

                                                            method mergeContext

                                                            mergeContext: (ctx: any) => this;

                                                              method process

                                                              process: {
                                                              (kwargs: any, cb?: () => void): void;
                                                              (eventId: string, kwargs: any, cb?: () => void): void;
                                                              };

                                                                method requestHandler

                                                                requestHandler: () => (
                                                                req: IncomingMessage,
                                                                res: ServerResponse,
                                                                next: () => void
                                                                ) => void;

                                                                  method setContext

                                                                  setContext: (ctx: any) => this;

                                                                    method setDataCallback

                                                                    setDataCallback: (fn: DataCallback) => this;

                                                                      method setShouldSendCallback

                                                                      setShouldSendCallback: (fn: ShouldSendCallback) => this;

                                                                        method uninstall

                                                                        uninstall: () => this;

                                                                          method wrap

                                                                          wrap: { <T>(func: () => T): () => T; <T>(options: any, func: () => T): () => T };

                                                                            Interfaces

                                                                            interface CaptureOptions

                                                                            interface CaptureOptions {}

                                                                              property extra

                                                                              extra?: { [key: string]: any } | undefined;

                                                                                property fingerprint

                                                                                fingerprint?: string[] | undefined;

                                                                                  property level

                                                                                  level?: string | undefined;

                                                                                    property req

                                                                                    req?: IncomingMessage | undefined;

                                                                                      property tags

                                                                                      tags?: { [key: string]: string } | undefined;

                                                                                        property user

                                                                                        user?: any;

                                                                                          interface ConstructorOptions

                                                                                          interface ConstructorOptions {}

                                                                                            property autoBreadcrumbs

                                                                                            autoBreadcrumbs?: boolean | { [breadcrumbType: string]: boolean } | undefined;

                                                                                              property captureUnhandledRejections

                                                                                              captureUnhandledRejections?: boolean | undefined;

                                                                                                property dataCallback

                                                                                                dataCallback?: DataCallback | undefined;

                                                                                                  property environment

                                                                                                  environment?: string | undefined;

                                                                                                    property extra

                                                                                                    extra?: { [key: string]: any } | undefined;

                                                                                                      property logger

                                                                                                      logger?: string | undefined;

                                                                                                        property maxBreadcrumbs

                                                                                                        maxBreadcrumbs?: number | undefined;

                                                                                                          property maxReqQueueCount

                                                                                                          maxReqQueueCount?: number | undefined;

                                                                                                            property name

                                                                                                            name?: string | undefined;

                                                                                                              property parseUser

                                                                                                              parseUser?: boolean | string[] | parseUserCallback | undefined;

                                                                                                                property release

                                                                                                                release?: string | undefined;

                                                                                                                  property sampleRate

                                                                                                                  sampleRate?: number | undefined;

                                                                                                                    property sendTimeout

                                                                                                                    sendTimeout?: number | undefined;

                                                                                                                      property shouldSendCallback

                                                                                                                      shouldSendCallback?: ShouldSendCallback | undefined;

                                                                                                                        property tags

                                                                                                                        tags?: { [key: string]: string } | undefined;

                                                                                                                          property transport

                                                                                                                          transport?: transports.Transport | undefined;

                                                                                                                            interface parsedDSN

                                                                                                                            interface parsedDSN {}

                                                                                                                              property host

                                                                                                                              host: string;

                                                                                                                                property path

                                                                                                                                path: string;

                                                                                                                                  property port

                                                                                                                                  port: number;

                                                                                                                                    property private_key

                                                                                                                                    private_key: string;

                                                                                                                                      property project_id

                                                                                                                                      project_id: string;

                                                                                                                                        property protocol

                                                                                                                                        protocol: string;

                                                                                                                                          property public_key

                                                                                                                                          public_key: string;

                                                                                                                                            Type Aliases

                                                                                                                                            type CaptureCallback

                                                                                                                                            type CaptureCallback = (sendErr: Error | null | undefined, eventId: any) => void;

                                                                                                                                              type DataCallback

                                                                                                                                              type DataCallback = (data: { [key: string]: any }) => any;
                                                                                                                                              • Needs to return the modified data. It is not enough to just mutate the data and return nothing. https://github.com/getsentry/raven-node/blob/6f7145161a33134168ca87b53bb99b9b6d3c89e4/lib/client.js#L246-L248

                                                                                                                                              type FatalErrorCallback

                                                                                                                                              type FatalErrorCallback = (
                                                                                                                                              err: Error,
                                                                                                                                              sendErr: Error | null | undefined,
                                                                                                                                              eventId: string
                                                                                                                                              ) => void;

                                                                                                                                                type parseUserCallback

                                                                                                                                                type parseUserCallback = (req: any) => any;

                                                                                                                                                  type ShouldSendCallback

                                                                                                                                                  type ShouldSendCallback = (data: { [key: string]: any }) => boolean;

                                                                                                                                                    Namespaces

                                                                                                                                                    namespace transports

                                                                                                                                                    namespace transports {}

                                                                                                                                                      variable http

                                                                                                                                                      const http: HTTPTransport;

                                                                                                                                                        variable https

                                                                                                                                                        const https: HTTPSTransport;

                                                                                                                                                          class HTTPSTransport

                                                                                                                                                          class HTTPSTransport extends HTTPTransport {}

                                                                                                                                                            class HTTPTransport

                                                                                                                                                            class HTTPTransport extends Transport {}

                                                                                                                                                              constructor

                                                                                                                                                              constructor(options?: HTTPTransportOptions);

                                                                                                                                                                property agent

                                                                                                                                                                agent: Agent;

                                                                                                                                                                  property defaultPort

                                                                                                                                                                  defaultPort: string;

                                                                                                                                                                    property options

                                                                                                                                                                    options: HTTPTransportOptions;

                                                                                                                                                                      method send

                                                                                                                                                                      send: (
                                                                                                                                                                      client: Client,
                                                                                                                                                                      message: any,
                                                                                                                                                                      headers: OutgoingHttpHeaders,
                                                                                                                                                                      eventId: string,
                                                                                                                                                                      cb: CaptureCallback
                                                                                                                                                                      ) => void;

                                                                                                                                                                        class Transport

                                                                                                                                                                        abstract class Transport extends EventEmitter {}

                                                                                                                                                                          method send

                                                                                                                                                                          abstract send: (
                                                                                                                                                                          client: Client,
                                                                                                                                                                          message: any,
                                                                                                                                                                          headers: OutgoingHttpHeaders,
                                                                                                                                                                          eventId: string,
                                                                                                                                                                          cb: CaptureCallback
                                                                                                                                                                          ) => void;

                                                                                                                                                                            interface HTTPTransportOptions

                                                                                                                                                                            interface HTTPTransportOptions {}

                                                                                                                                                                              property agent

                                                                                                                                                                              agent?: Agent | undefined;

                                                                                                                                                                                property ca

                                                                                                                                                                                ca?: string | undefined;

                                                                                                                                                                                  property headers

                                                                                                                                                                                  headers?: OutgoingHttpHeaders | undefined;

                                                                                                                                                                                    property hostname

                                                                                                                                                                                    hostname?: string | undefined;

                                                                                                                                                                                      property method

                                                                                                                                                                                      method?: 'POST' | 'GET' | undefined;

                                                                                                                                                                                        property path

                                                                                                                                                                                        path?: string | undefined;

                                                                                                                                                                                          property port

                                                                                                                                                                                          port?: number | undefined;

                                                                                                                                                                                            property rejectUnauthorized

                                                                                                                                                                                            rejectUnauthorized?: boolean | undefined;

                                                                                                                                                                                              namespace utils

                                                                                                                                                                                              namespace utils {}

                                                                                                                                                                                                function consoleAlert

                                                                                                                                                                                                consoleAlert: (msg: string) => void;

                                                                                                                                                                                                  function parseDSN

                                                                                                                                                                                                  parseDSN: (dsn: string | false) => parsedDSN | false;

                                                                                                                                                                                                    Package Files (1)

                                                                                                                                                                                                    Dependencies (1)

                                                                                                                                                                                                    Dev Dependencies (0)

                                                                                                                                                                                                    No dev dependencies.

                                                                                                                                                                                                    Peer Dependencies (0)

                                                                                                                                                                                                    No peer dependencies.

                                                                                                                                                                                                    Badge

                                                                                                                                                                                                    To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                                                                                                                                    You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/raven.

                                                                                                                                                                                                    • Markdown
                                                                                                                                                                                                      [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/raven)
                                                                                                                                                                                                    • HTML
                                                                                                                                                                                                      <a href="https://www.jsdocs.io/package/@types/raven"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>