From 760d336a32d1c38e46f3055c6edcf581ee7f9b2a Mon Sep 17 00:00:00 2001 From: "S. Elliott Johnson" Date: Mon, 8 May 2023 22:41:57 -0600 Subject: [PATCH] Convert src/shared/boolean_attributes.ts to JavaScript --- src/shared/boolean_attributes.ts | 62 ++++++++++++++++---------------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/src/shared/boolean_attributes.ts b/src/shared/boolean_attributes.ts index a65350d45c..85fce1fbb0 100644 --- a/src/shared/boolean_attributes.ts +++ b/src/shared/boolean_attributes.ts @@ -1,35 +1,37 @@ const _boolean_attributes = [ - 'allowfullscreen', - 'allowpaymentrequest', - 'async', - 'autofocus', - 'autoplay', - 'checked', - 'controls', - 'default', - 'defer', - 'disabled', - 'formnovalidate', - 'hidden', - 'inert', - 'ismap', - 'loop', - 'multiple', - 'muted', - 'nomodule', - 'novalidate', - 'open', - 'playsinline', - 'readonly', - 'required', - 'reversed', - 'selected' -] as const; - -export type BooleanAttributes = (typeof _boolean_attributes)[number]; - + 'allowfullscreen', + 'allowpaymentrequest', + 'async', + 'autofocus', + 'autoplay', + 'checked', + 'controls', + 'default', + 'defer', + 'disabled', + 'formnovalidate', + 'hidden', + 'inert', + 'ismap', + 'loop', + 'multiple', + 'muted', + 'nomodule', + 'novalidate', + 'open', + 'playsinline', + 'readonly', + 'required', + 'reversed', + 'selected' +]; /** * List of HTML boolean attributes (e.g. ``). * Source: https://html.spec.whatwg.org/multipage/indices.html + * @type {Set} */ -export const boolean_attributes: Set = new Set([..._boolean_attributes]); +export const boolean_attributes = new Set([..._boolean_attributes]); + + +/** @typedef {Class<_boolean_attributes>} BooleanAttributes */ +