typestub-grant-express
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

TypeStub for grant-express

add types to npm package grant-express and allow consumer to directly import and develop with Typescript

npm Package Version

Javascript source: https://github.com/simov/grant

Typescript stub: https://github.com/beenotung/typestub-grant-express

Example

import * as express from 'express'
import * as grant from 'typestub-grant-express'

const app = express();

// grant(123) // this should raise tsc-error

app.use(
    grant({
        defaults: {
            protocol: 'http',
            host: 'localhost:8080',
            transport: 'session',
            state: true,
        },
        google: {
            key: 'GOOGLE_CLIENT_ID',
            secret: 'GOOGLE_CLIENT_SECRET',
            scope: ['profile', 'email'],
            callback: '/login/google',
        },
    }),
);

License

BSD-2-Clause (Free Open Source Software)

Package Sidebar

Install

npm i typestub-grant-express

Weekly Downloads

2

Version

1.0.0

License

BSD-2-Clause

Unpacked Size

22.6 kB

Total Files

6

Last publish

Collaborators

  • beenotung