A detailed description of TYP files and their underlying text files can be found in the cgpsmapper manual, and they can be compiled with cgpsmapper free. AFAIK TYP files created with cgpsmapper work with mkgmap compiled IMG files.