maierfelix/nvk

No global constants in index.d.ts

Closed this issue · 2 comments

This can be fixed by adding

{% for child in enu.children -%}
const {{ child.name }}: {{ enu.name }};
{% endfor %}

between

enum {{ enu.name }} {
    {% for child in enu.children -%}
    {{ child.name }},
    {% endfor %}
}

and

{% endfor %}

in file generator/templates/typescript-ts.njk

Hey @Taras55 , I pushed the fixes, could you approve that they are correct?

Expecting this to be solved