Closed mjbvz closed 5 years ago
One other fun case with declaration merging:
interface Response{
stuff: any;
}
async function a() {
const response = await fetch(`https://example.com`);
response.jsonX();
}
In this case, it may make sense to show the declare
quick fixes as long as they only modify the Response
interface in the file and not the Response
interface from dom.d.ts
. Or we could just choose to never show these quick fixes for types that are from lib.d.ts
TypeScript Version: typescript@3.3.0-dev.20190118
Search Terms:
Code
For the code:
Trigger quickfixes on
jsonX
Bug
declare
andadd index
quick fixes returned. These modify thedom.d.ts
declarations of fetch.We should never try to edit the lib.d.ts files
Playground Link:
Related Issues: