Building types creates circular dependencies and references to itself. To reproduce the issue you can clone Inferno repository https://github.com/infernojs
npm install
npm run build:typings
Now open generated typings file in
https://github.com/infernojs/inferno/tree/master/packages/inferno/dist/
See that there are multiple typescript errors
This was originally reported to Inferno here:
infernojs/inferno#1377