Add Types builder API documentation.

Also add check that scale <= precision and test.