Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
@types/connect-pg-simple
Advanced tools
npm install --save @types/connect-pg-simple
This package contains type definitions for connect-pg-simple (https://github.com/voxpelli/node-connect-pg-simple#readme).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/connect-pg-simple.
// Type definitions for connect-pg-simple 4.2
// Project: https://github.com/voxpelli/node-connect-pg-simple#readme
// Definitions by: Pasi Eronen <https://github.com/pasieronen>, Samar Mohan <https://github.com/samarmohan>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.4
import { RequestHandler } from "express";
import { Store, SessionData, SessionOptions } 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;
createTableIfMissing?: boolean | undefined;
schemaName?: string | undefined;
tableName?: string | undefined;
pruneSessionInterval?: false | number | undefined;
errorLog?: ((...args: any[]) => void) | undefined;
}
}
export = connectPgSimple;
These definitions were written by Pasi Eronen, and Samar Mohan.
FAQs
TypeScript definitions for connect-pg-simple
The npm package @types/connect-pg-simple receives a total of 17,128 weekly downloads. As such, @types/connect-pg-simple popularity was classified as popular.
We found that @types/connect-pg-simple demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.