Re:Fusion.js: A Plugin-Based Universal Web Framework
by Keats on Wednesday August 01, 2018 @02:42PM
(#17665617)
Does this inference work across files?
[ Parent
| on HN ]
Re:Fusion.js: A Plugin-Based Universal Web Framework
by lhorie on Wednesday August 01, 2018 @04:22PM
(#17666612)
Yes, with some caveats. If you're `export`ing something as a package, you need to expose its types so that the consumer knows what its signature looks like. Once that is done, calling a function that was defined in another package will get type inference, as seen in the screenshot I posted.