Take a copy of the type API.

Not much of a refactor yet.
Don’t need to import the type API now.