Ensure that generated signatures are semantically correct

Part of #748 

The idea is that if we add the generated signature to the end of current project, it will not produce any type error. This PR paves the way to add syntax coloring to generated signatures.
Why you ignore these interfaces? Won't generated types be incomplete then?