question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Export HelmetOptions interface

See original GitHub issue

I’m not sure whether it’s done intentionally but I personally need the interface (which used to be exported when it was within DefinitelyTyped) since I wrap this into a sort of setupServer functionality taking on a couple of object options including helmet.

The following seems impossible (besides copy/pasting from the source code) unless exporting this interface

helmet?: HelmetOptions;

I’ve personally forked the repository & exported the interface to make it work but wanted to check first whether it was done on purpose before creating a pull request.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
EvanHahncommented, Dec 14, 2020

Unfortunately, I won’t be able to export HelmetOptions in this major version without making a breaking change. Would something like this work for you?

type HelmetOptions = Parameters<typeof helmet>[0];
1reaction
EvanHahncommented, May 18, 2021

I’ll plan to revisit the export story in Helmet 5. Follow along in #320.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Export the HelmetOptions interface #271 - GitHub
I just released Helmet v5.0.0-beta.1 which addresses this. You can now import helmet, { HelmetOptions } from 'helmet' . Please give it a...
Read more >
Upgrading Helmet to v4.5.0 and needing equivalent type to ...
You could update the Options interface to take all of Helmet's options: import helmet from 'helmet'; export interface Options { // .
Read more >
helmet - Bountysource
module.exports = contentSecurityPolicy; export default contentSecurityPolicy; ... Property 'dnsPrefetchControl' of exported interface has or is using name ...
Read more >
Security - Meteor Guide
Here's a secure example Method from the Todos example app: export const makePrivate = new ValidatedMethod({ name: ' ...
Read more >
Exporting data from the UI - Advanced export
Clicking the Advanced export option of an object listing interface in Xperience opens one of two possible Advanced export dialogs, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found