madskristensen / TypeScriptDefinitionGenerator

A Visual Studio extension
Other
85 stars 46 forks source link

GlobalScope=true option is not respected in navigation property types #59

Open buchatsky opened 2 years ago

buchatsky commented 2 years ago

Description

When GlobalScope option is set to True, the type definitions are generated correctly in the global scope (without a surrounding module). But if one entity references another the reference type is generated incorrectly with DefaultModuleName prefix despite GlobalScope=True:

Current behavior

    class Supplier {
        ...
        }
    class Product {
        productId: number;
                ...
        supplierId?: number;
        supplier: server.Supplier;
    }

If DefaultModuleName is an empty string, it is generated as supplier: .Supplier;

Expected behavior

    class Product {
        ...
            supplier: Supplier;
        }

Installed product versions