From d58e488fa210d83e8cac814ff207403d51a532ab Mon Sep 17 00:00:00 2001 From: LongYinan Date: Thu, 2 Dec 2021 15:46:20 +0800 Subject: [PATCH] fix(cli): missing exported enum --- cli/src/build.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cli/src/build.ts b/cli/src/build.ts index 1d512310..51f66f97 100644 --- a/cli/src/build.ts +++ b/cli/src/build.ts @@ -383,6 +383,9 @@ export class ExternalObject { dts += indentLines(`}`, nest) + '\n' break case 'enum': + if (!nested) { + idents.push(def.name) + } dts += indentLines(`${def.js_doc}export enum ${def.name} {`, nest) + '\n' dts += indentLines(def.def, nest + 2) + '\n'