Coder Social home page Coder Social logo

Add Typescript Support about express-jwt-authz HOT 5 CLOSED

auth0 avatar auth0 commented on July 20, 2024
Add Typescript Support

from express-jwt-authz.

Comments (5)

jake-wickstrom-lb avatar jake-wickstrom-lb commented on July 20, 2024 4

Version 2.3.1 does not include the type declarations

One potential (temporary) workaround would be to use the master branch directly as your dependency rather than going through the latest version published to npm

npm install --save auth0/express-jwt-authz#master

You can also include the typings directly in the typings directory of your project until this a new version of this package is published to npm

from express-jwt-authz.

SayakMukhopadhyay avatar SayakMukhopadhyay commented on July 20, 2024 1

Yeah, a long time has gone since this was pushed to master but no release to NPM. There are #32 #34 #35 lying around. Can this be please pushed to NPM?

from express-jwt-authz.

jake-wickstrom-lb avatar jake-wickstrom-lb commented on July 20, 2024

Created PR #29 to address this

from express-jwt-authz.

rplusg avatar rplusg commented on July 20, 2024

Hi, is there is any work around for this issue:

src/server.ts:4:22 - error TS7016: Could not find a declaration file for module 'express-jwt-authz'. 'C:/Code/Nodejs_practice/nodeHttp/node_modules/express-jwt-authz/lib/index.js' implicitly has an 'any' type.
Try npm install @types/express-jwt-authz if it exists or add a new declaration (.d.ts) file containing declare module 'express-jwt-authz';

4 import jwtAuthz from 'express-jwt-authz';

Im on express-jwt-authz 2.3.1 version(taken from package json)

from express-jwt-authz.

fmozaffari avatar fmozaffari commented on July 20, 2024

@jake-wickstrom-lb thanks for the workaround. Any Eta on when the typings will become available?

from express-jwt-authz.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.