Issues with TypeScript imports in 4.0.0
See original GitHub issueCode like below overrides the exported object, which causes default
being missing from every module.
module.exports = contentSecurityPolicy;
export default contentSecurityPolicy;
For example, inside index.ts
, add console.log("wat", expectCt);
under the import, and we’ll see it’s undefined
.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:25 (9 by maintainers)
Top Results From Across the Web
Documentation - TypeScript 4.0
One specific issue that we heard from users was that auto-imports didn't work on dependencies that were written in TypeScript - that is,...
Read more >Announcing TypeScript 4.0 - Microsoft Developer Blogs
One specific issue that we heard from users was that auto-imports didn't work on dependencies that were written in TypeScript – that is,...
Read more >2 ESM interoperability issue with Node + Typescript + Webpack
For anybody facing with the same problem, I am using node: ... esm1: webpack.config.js import path from 'path'; import {fileURLToPath} from ...
Read more >TypeScript support in Svelte - Learn web development
Note: The Svelte template uses svelte-preprocess 4.0.0 to support TypeScript. From that version onward you have to use export / import type ...
Read more >Migrating to AWS CDK v2 - AWS Documentation - Amazon.com
Troubleshooting. TypeScript 'from' expected or ';' expected error in imports. Upgrade to TypeScript 3.8 or later. Run 'cdk bootstrap ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
+1 for helmet@4.1.0-rc.2. Typing issues are resolved.
For anybody that was previously importing the
HelmetOptions
interface, e.g. you’re assigning the options to a variable rather than directly invoking the middleware function, you can do it by extracting the type from the middleware arg:This should be fixed in the next version. Please try it out with
npm install helmet@4.1.0-rc.2
and let me know what you think. Once I get a few successful reports, I’ll release it.