Generting imports for external enums in TS (#5175)
This commit is contained in:
parent
a66a88034a
commit
224f7527e3
|
@ -763,6 +763,10 @@ class JsTsGenerator : public BaseGenerator {
|
|||
GenPrefixedTypeName(GenTypeName(field.value.type, false, true),
|
||||
field.value.type.enum_def->file) +
|
||||
" {\n";
|
||||
|
||||
if (!parser_.opts.generate_all) {
|
||||
imported_files.insert(field.value.type.enum_def->file);
|
||||
}
|
||||
} else {
|
||||
code += "):" + GenTypeName(field.value.type, false, true) + " {\n";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue