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

@types/connect-pg-simple

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/connect-pg-simple

TypeScript definitions for connect-pg-simple

  • 7.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10K
decreased by-57.85%
Maintainers
1
Weekly downloads
 
Created
Source

Installation

npm install --save @types/connect-pg-simple

Summary

This package contains type definitions for connect-pg-simple (https://github.com/voxpelli/node-connect-pg-simple#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/connect-pg-simple.

index.d.ts

import { RequestHandler } from "express";
import { SessionData, SessionOptions, Store } from "express-session";
import { Pool, PoolConfig } from "pg";

declare function connectPgSimple(session: (options?: SessionOptions) => RequestHandler): typeof connectPgSimple.PGStore;

declare namespace connectPgSimple {
    class PGStore extends Store {
        constructor(options?: PGStoreOptions);
        close(): void;
        pruneSessions(callback?: (err: Error) => void): void;

        get(sid: string, callback: (err: any, session?: SessionData | null) => void): void;
        set(sid: string, session: SessionData, callback?: (err?: any) => void): void;
        destroy(sid: string, callback?: (err?: any) => void): void;

        touch(sid: string, session: SessionData, callback?: () => void): void;
    }
    interface PGStoreOptions {
        pool?: Pool | undefined;
        pgPromise?: object | undefined; // not typed to avoid dependency to "pg-promise" module (which includes its own types)
        conString?: string | undefined;
        conObject?: PoolConfig | undefined;
        ttl?: number | undefined;
        disableTouch?: boolean | undefined;
        createTableIfMissing?: boolean | undefined;
        schemaName?: string | undefined;
        tableName?: string | undefined;
        pruneSessionInterval?: false | number | undefined;
        errorLog?: ((...args: any[]) => void) | undefined;
    }
}

export = connectPgSimple;

Additional Details

Credits

These definitions were written by Pasi Eronen, and Samar Mohan.

FAQs

Package last updated on 18 Oct 2023

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