Skip to content

beenotung/typestub-grant-express

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published