This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Description
- Open the Brackets src folder
- Open QuickOpen.js
- Insert the following code just below the QuickOpenPlugin() constructor:
function foo(a, b) {
return a + b;
}
foo(
- Press Ctrl+space after the
(
Result: hint suggests the arguments are of type "fn:(pluginDef: ?)" and "fn()" respectively.
Expected: if I place the same code at the top or bottom of the module, it says "?" for both types.
It seems to vary a lot by position within the file. If I place the code after _filenameFromPath() I get "fn(query: String.prototype) -> number" and "fn() -> [?]" instead. It seems like the first argument is always inferred to be essentially a function with the same signature as whatever function came right before foo() in the code. I'm not sure why it would make sense to guess that, though.