Support Autocomplete path for specific functions in web storm
Hi
i ask for a method to support Auto-complete path for a specific function in webStorm
as require() function
i need a method options/TypeScript Declaration from https://github.com/DefinitelyTyped/DefinitelyTyped
for Example, I wrote the next DefinitelyTyped file
declare namespace MainCaller{
export namespace Windows{
/**
* @param {String} url
*/
export function open(
url:URL,
options:{
global:boolean,
transparent?:number
},
callback?:(window:Window)=>void // option
):object;
}
}
i need to support auto-complete path for open() function
this includes specifying the root/s of the inclusion
no matter if the solution based on webStorm configuration or it's a trick in DefinitelyTyped File
I just need a Solution
Thanks
Please sign in to leave a comment.
You can manually inject "File Reference" language in this function calls: put cursor between quotes in argument value, hit Alt+Enter, choose to inject language or references, choose File reference from the list:
Note that 1) injection is temporal and 2) needs to be done manually when using that function (on every function usage)