From c8f95f12f4a9d118e0aac4ce43475944ac1a3a55 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Tue, 5 Jul 2022 18:18:54 +0000 Subject: [PATCH] [TS] Properly export unitary enums such that they're in *.d.mjs Because the `ts/enums/*` files simply re-export from `bindings.mts` rather than defining the enum from scratch, we have to include docs and cannot use /* @internal */ on the `bindings.mts` unitary enums. --- typescript_strings.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/typescript_strings.py b/typescript_strings.py index c8fcfc93..5ae728f9 100644 --- a/typescript_strings.py +++ b/typescript_strings.py @@ -779,8 +779,12 @@ import * as bindings from '../bindings.mjs' out_c = out_c + "\t}\n" out_c = out_c + "}\n" + # Note that this is *not* marked /* @internal */ as we re-expose it directly in enums/ + enum_comment_formatted = enum_doc_comment.replace("\n", "\n * ") out_typescript = f""" -/* @internal */ +/** + * {enum_comment_formatted} + */ export enum {struct_name} {{ {out_typescript_enum_fields} }} -- 2.39.5