documentation and example for declaring type libraries