Hacker News new | ask | show | jobs
by Keats 2884 days ago
Does this inference work across files?
1 comments

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.