That’s unfortunate types in the same module are order dependent. I’ve changed it so TypeScript generates types in order by deps in this commit.
You will also be able to control what types are generated in what Order with the new FilterTypes
property on all Native Type Generators, e.g:
TypeScriptGenerator.FilterTypes = types => types
.Where(x => x.Name != "ExcludeType")
.OrderBy(x => x.Name).ToList();
This change is available from v4.5.1 that’s now available on MyGet.