fix(cli): missing exported enum

This commit is contained in:
LongYinan 2021-12-02 15:46:20 +08:00
parent 24c5d6950e
commit d58e488fa2
No known key found for this signature in database
GPG key ID: C3666B7FC82ADAD7

View file

@ -383,6 +383,9 @@ export class ExternalObject<T> {
dts += indentLines(`}`, nest) + '\n' dts += indentLines(`}`, nest) + '\n'
break break
case 'enum': case 'enum':
if (!nested) {
idents.push(def.name)
}
dts += dts +=
indentLines(`${def.js_doc}export enum ${def.name} {`, nest) + '\n' indentLines(`${def.js_doc}export enum ${def.name} {`, nest) + '\n'
dts += indentLines(def.def, nest + 2) + '\n' dts += indentLines(def.def, nest + 2) + '\n'