Giter VIP home page Giter VIP logo

Comments (5)

gpinto67 avatar gpinto67 commented on May 13, 2024

options types are resolving to never for all options, despite the fact that headers like hsts and other should take options for configuration.

image

image

from koa-helmet.

jraoult avatar jraoult commented on May 13, 2024

There are other issues with the definition file when using moduleResolution with NodeNext or Node16 although they are not relevant for this issue. The main issue is in koa-helmet.d.ts that somehow the following is not working anymore:

type HelmetOptions = Required<Parameters<typeof helmet>>[0];

and we can use instead:

type HelmetOptions = Required<Parameters<typeof helmet.default>>[0];

or even simpler:

type HelmetOptions = helmet.HelmetOptions;

and yeah, of course, there is also the case issue mentioned by @zvaehn for the particular case of scriptSrcAttr.

from koa-helmet.

julienw avatar julienw commented on May 13, 2024

I believe that last issue is what gives the error is not assignable to undefined.
It would be good to fix this. Anyone want to do a PR about this?

from koa-helmet.

heunghingwan avatar heunghingwan commented on May 13, 2024

done. #87

from koa-helmet.

venables avatar venables commented on May 13, 2024

Sorry about this! Fixed in #87 and released in version 7.0.2

from koa-helmet.

Related Issues (20)

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.