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

@types/express-mysql-session

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/express-mysql-session

TypeScript definitions for express-mysql-session

  • 2.1.3
  • ts3.6
  • ts3.7
  • ts3.8
  • ts3.9
  • ts4.0
  • ts4.1
  • ts4.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.3K
decreased by-40.82%
Maintainers
1
Weekly downloads
 
Created
Source

Installation

npm install --save @types/express-mysql-session

Summary

This package contains type definitions for express-mysql-session (https://github.com/chill117/express-mysql-session#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express-mysql-session.

index.d.ts

// Type definitions for express-mysql-session 2.1
// Project: https://github.com/chill117/express-mysql-session#readme
// Definitions by: Akim95 <https://github.com/Akim95>
//                 Sebastian Krüger <https://github.com/mathe42>
//                 Ionaru <https://github.com/Ionaru>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

import * as expressSession from 'express-session';

export = MySQLStore;

declare function MySQLStore(session: typeof expressSession): typeof MySQLStoreClass;

declare namespace MySQLStore {
    interface Options {
        host?: string | undefined;
        port?: number | undefined;
        user?: string | undefined;
        password?: string | undefined;
        database?: string | undefined;
        checkExpirationInterval?: number | undefined;
        expiration?: number | undefined;
        createDatabaseTable?: boolean | undefined;
        connectionLimit?: number | undefined;
        schema?: Partial<Schema> | undefined;
    }
    interface Schema {
        tableName: string;
        columnNames: Partial<ColumnNames>;
    }
    interface ColumnNames {
        session_id: string;
        expires: string;
        data: string;
    }

    type MySQLStore = MySQLStoreClass;
}

declare class MySQLStoreClass extends expressSession.Store {
    constructor(options: MySQLStore.Options, connection?: any, callback?: (error: any) => void);

    setDefaultOptions(): void;

    setOptions(options: MySQLStore.Options): void;

    validateOptions(options: MySQLStore.Options): void;

    createDatabaseTable(callback?: (error: any) => void): void;

    get(sessionId: string, callback?: (error: any, session: any) => void): void;

    set(sessionId: string, data: any, callback?: (error: any) => void): void;

    touch(sessionId: string, data: any, callback?: (error: any) => void): void;

    destroy(sessionId: string, callback?: (error: any) => void): void;

    length(callback?: (error: any, count: any) => void): void;

    all(callback?: (error: any, sessions: any) => void): void;

    clear(callback?: (error: any) => void): void;

    clearExpiredSessions(callback?: (error: any) => void): void;

    query(sql: string, params: any, callback?: (error: any, rows: any, fields: any) => void): void;

    setExpirationInterval(interval: number): void;

    clearExpirationInterval(): void;

    close(callback?: () => void): void;
}

Additional Details

  • Last updated: Thu, 08 Jul 2021 12:01:20 GMT
  • Dependencies: @types/express-session
  • Global values: none

Credits

These definitions were written by Akim95, Sebastian Krüger, and Ionaru.

FAQs

Package last updated on 08 Jul 2021

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