AfterTypeCheck is called immediately after a list of files has been type-checked and appended to info.Files.

This optional hook function is the earliest opportunity for the client to observe the output of the type checker, which may be useful to reduce analysis latency when loading a large program.

The function is permitted to modify info.Info, for instance to clear data structures that are no longer needed, which can dramatically reduce peak memory consumption.

The function may be called twice for the same PackageInfo: once for the files of the package and again for the in-package test files.

It must be safe to call concurrently from multiple goroutines.