Generated code breaks after update to TypeScript 2.6.1
See original GitHub issueHi,
Since we’ve updated to TypeScript 2.6.1 the generated output breaks our build. This is due to the headers in the output which don’t conform to the new RequestInit
interface in lib.dom.ts. In the old version it accepted a <any>
type for the headers property but now it only accepts <Headers | string[][]>
.
For now we can simply solve this by reverting to TypeScript version 2.5.3.
Is there a way to influence the way the headers get generated?
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (11 by maintainers)
Top Results From Across the Web
d.ts not compiling after TypeScript 2.6.1
This is mentioned on the breaking changes page. Export assignments like the one in question are executable code, and 2.6.1 was made more ......
Read more >Documentation - TypeScript 3.9
We heard from the Visual Studio Code team that when renaming a file, just figuring out which import statements needed to be updated...
Read more >October 2017 (version 1.18)
VS Code 1.18 ships with TypeScript 2.6.1. This update provides VS Code with several exciting tooling improvements and also fixes a few bugs....
Read more >Use TypeScript to Build a Node API with Express
Use TypeScript to Build a Node API with Express This tutorial walks you through building a simple and secure Node application using ...
Read more >MakeCode Languages: Blocks, Static TypeScript and Static ...
Both Blocks and Static Python are converted to Static TypeScript before being compiled to lower-level languages. Blocks is implemented using Google Blockly.
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 Free
Top 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
Assigning an object {} to header is not specified by MDN, but supported by the browser. We are using an fetch Decorator to set the token. In the old version, setting headers.Authorization works fine.
Now we have to use the headers.set method, to inject the token.
Works like a charm!
Thank you for the speedy solution.