From 9177fe7a8955295a0d56e651ddc70e33d6c2a4a6 Mon Sep 17 00:00:00 2001 From: spiffytech Date: Sun, 13 Feb 2022 13:37:51 -0800 Subject: [PATCH] #38: Restore TypeScript support for using a non-namespaced TS jsxFactory (#41) Co-authored-by: spiffytech Co-authored-by: Jeswin --- package.json | 11 +- src/index.ts | 33 +- src/jsxTypes.ts | 1683 ++++++++++++++++++++++++----------------------- tsconfig.json | 7 +- 4 files changed, 883 insertions(+), 851 deletions(-) diff --git a/package.json b/package.json index ac5163b..ee8dc55 100644 --- a/package.json +++ b/package.json @@ -3,18 +3,13 @@ "version": "2.2.0", "main": "./dist/index.js", "type": "module", - "types": "./dist/index.d.ts", "author": "Jeswin Kumar", "repository": { "type": "git", "url": "https://github.com/forgojs/forgo" }, - "exports": { - ".": { - "import": "./dist/forgo.min.js", - "types": "./dist/index.d.ts" - } - }, + "exports": "./dist/forgo.min.js", + "types": "./dist/index.d.ts", "devDependencies": { "@types/jsdom": "^16.2.14", "@types/mocha": "^9.1.0", @@ -28,7 +23,7 @@ }, "scripts": { "clean": "rimraf ./dist", - "build": "npm run clean && mkdir -p dist && npx tsc --emitDeclarationOnly && npx esbuild src/index.ts --minify --sourcemap --target=es2015 --outfile=dist/forgo.min.js", + "build": "npm run clean && npx tsc --emitDeclarationOnly && npx esbuild ./src/index.ts --minify --bundle --format=esm --sourcemap --target=es2015 --outfile=dist/forgo.min.js", "build-dev": "npx tsc", "test": "npx tsc && npx mocha dist/test/test.js" }, diff --git a/src/index.ts b/src/index.ts index 76571a3..39858c9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1859,6 +1859,33 @@ function findNodeIndex( } /* JSX Types */ -import type { JSXTypes } from "./jsxTypes"; - -export { JSXTypes as JSX }; +/* + JSX typings expect a JSX namespace to be in scope for the forgo module (if a + using a jsxFactory like forgo.createElement), or attached to the naked factory + function (if using a jsxFactory like createElement). + + See: https://www.typescriptlang.org/docs/handbook/jsx.html#intrinsic-elements + Also: https://dev.to/ferdaber/typescript-and-jsx-part-ii---what-can-create-jsx-22h6 + Also: https://www.innoq.com/en/blog/type-checking-tsx/ + + Note that importing a module turns it into a namespace on this side of the + import, so it doesn't need to be declared as a namespace inside jsxTypes.ts. + However, attempting to declare it that way causes no end of headaches either + when trying to reexport it here, or reexport it from a createElement + namespace. Some errors arise at comple or build time, and some are only + visible when a project attempts to consume forgo. +*/ +// This covers a consuming project using the forgo.createElement jsxFactory +export * as JSX from "./jsxTypes.js"; + +// If jsxTypes is imported using named imports, esbuild doesn't know how to +// erase the imports and gets pset that "JSX" isn't an actual literal value +// inside the jsxTypes.ts module. We have to import as a different name than the +// export within createElement because I can't find a way to export a namespace +// within a namespace without using import aliases. +import * as JSXTypes from "./jsxTypes.js"; +// The createElement namespace exists so that users can set their TypeScript +// jsxFactory to createElement instead of forgo.createElement. +export namespace createElement { + export import JSX = JSXTypes; +} \ No newline at end of file diff --git a/src/jsxTypes.ts b/src/jsxTypes.ts index ff161cf..d8045dc 100644 --- a/src/jsxTypes.ts +++ b/src/jsxTypes.ts @@ -1,7 +1,7 @@ import type { ForgoDOMElementProps } from "./index.js"; /* JSX Definitions */ -export type Defaultize = +type Defaultize = // Distribute over unions Props extends any // Make any properties included in Default optional ? Partial>> & @@ -9,398 +9,404 @@ export type Defaultize = Pick> : never; -export namespace JSXTypes { - export type LibraryManagedAttributes = Component extends { - defaultProps: infer Defaults; - } - ? Defaultize - : Props; - - export interface IntrinsicAttributes { - key?: any; - } - - export interface ElementAttributesProperty { - props: any; - } - - export interface ElementChildrenAttribute { - children: any; - } - - export type DOMCSSProperties = { - [key in keyof Omit< - CSSStyleDeclaration, - | "item" - | "setProperty" - | "removeProperty" - | "getPropertyValue" - | "getPropertyPriority" - >]?: string | number | null | undefined; - }; - export type AllCSSProperties = { - [key: string]: string | number | null | undefined; - }; - export interface CSSProperties extends AllCSSProperties, DOMCSSProperties { - cssText?: string | null; - } - - export interface SVGAttributes - extends HTMLAttributes { - accentHeight?: number | string; - accumulate?: "none" | "sum"; - additive?: "replace" | "sum"; - alignmentBaseline?: - | "auto" - | "baseline" - | "before-edge" - | "text-before-edge" - | "middle" - | "central" - | "after-edge" - | "text-after-edge" - | "ideographic" - | "alphabetic" - | "hanging" - | "mathematical" - | "inherit"; - allowReorder?: "no" | "yes"; - alphabetic?: number | string; - amplitude?: number | string; - arabicForm?: "initial" | "medial" | "terminal" | "isolated"; - ascent?: number | string; - attributeName?: string; - attributeType?: string; - autoReverse?: number | string; - azimuth?: number | string; - baseFrequency?: number | string; - baselineShift?: number | string; - baseProfile?: number | string; - bbox?: number | string; - begin?: number | string; - bias?: number | string; - by?: number | string; - calcMode?: number | string; - capHeight?: number | string; - clip?: number | string; - clipPath?: string; - clipPathUnits?: number | string; - clipRule?: number | string; - colorInterpolation?: number | string; - colorInterpolationFilters?: "auto" | "sRGB" | "linearRGB" | "inherit"; - colorProfile?: number | string; - colorRendering?: number | string; - contentScriptType?: number | string; - contentStyleType?: number | string; - cursor?: number | string; - cx?: number | string; - cy?: number | string; - d?: string; - decelerate?: number | string; - descent?: number | string; - diffuseConstant?: number | string; - direction?: number | string; - display?: number | string; - divisor?: number | string; - dominantBaseline?: number | string; - dur?: number | string; - dx?: number | string; - dy?: number | string; - edgeMode?: number | string; - elevation?: number | string; - enableBackground?: number | string; - end?: number | string; - exponent?: number | string; - externalResourcesRequired?: number | string; - fill?: string; - fillOpacity?: number | string; - fillRule?: "nonzero" | "evenodd" | "inherit"; - filter?: string; - filterRes?: number | string; - filterUnits?: number | string; - floodColor?: number | string; - floodOpacity?: number | string; - focusable?: number | string; - fontFamily?: string; - fontSize?: number | string; - fontSizeAdjust?: number | string; - fontStretch?: number | string; - fontStyle?: number | string; - fontVariant?: number | string; - fontWeight?: number | string; - format?: number | string; - from?: number | string; - fx?: number | string; - fy?: number | string; - g1?: number | string; - g2?: number | string; - glyphName?: number | string; - glyphOrientationHorizontal?: number | string; - glyphOrientationVertical?: number | string; - glyphRef?: number | string; - gradientTransform?: string; - gradientUnits?: string; - hanging?: number | string; - horizAdvX?: number | string; - horizOriginX?: number | string; - ideographic?: number | string; - imageRendering?: number | string; - in2?: number | string; - in?: string; - intercept?: number | string; - k1?: number | string; - k2?: number | string; - k3?: number | string; - k4?: number | string; - k?: number | string; - kernelMatrix?: number | string; - kernelUnitLength?: number | string; - kerning?: number | string; - keyPoints?: number | string; - keySplines?: number | string; - keyTimes?: number | string; - lengthAdjust?: number | string; - letterSpacing?: number | string; - lightingColor?: number | string; - limitingConeAngle?: number | string; - local?: number | string; - markerEnd?: string; - markerHeight?: number | string; - markerMid?: string; - markerStart?: string; - markerUnits?: number | string; - markerWidth?: number | string; - mask?: string; - maskContentUnits?: number | string; - maskUnits?: number | string; - mathematical?: number | string; - mode?: number | string; - numOctaves?: number | string; - offset?: number | string; - opacity?: number | string; - operator?: number | string; - order?: number | string; - orient?: number | string; - orientation?: number | string; - origin?: number | string; - overflow?: number | string; - overlinePosition?: number | string; - overlineThickness?: number | string; - paintOrder?: number | string; - panose1?: number | string; - pathLength?: number | string; - patternContentUnits?: string; - patternTransform?: number | string; - patternUnits?: string; - pointerEvents?: number | string; - points?: string; - pointsAtX?: number | string; - pointsAtY?: number | string; - pointsAtZ?: number | string; - preserveAlpha?: number | string; - preserveAspectRatio?: string; - primitiveUnits?: number | string; - r?: number | string; - radius?: number | string; - refX?: number | string; - refY?: number | string; - renderingIntent?: number | string; - repeatCount?: number | string; - repeatDur?: number | string; - requiredExtensions?: number | string; - requiredFeatures?: number | string; - restart?: number | string; - result?: string; - rotate?: number | string; - rx?: number | string; - ry?: number | string; - scale?: number | string; - seed?: number | string; - shapeRendering?: number | string; - slope?: number | string; - spacing?: number | string; - specularConstant?: number | string; - specularExponent?: number | string; - speed?: number | string; - spreadMethod?: string; - startOffset?: number | string; - stdDeviation?: number | string; - stemh?: number | string; - stemv?: number | string; - stitchTiles?: number | string; - stopColor?: string; - stopOpacity?: number | string; - strikethroughPosition?: number | string; - strikethroughThickness?: number | string; - string?: number | string; - stroke?: string; - strokeDasharray?: string | number; - strokeDashoffset?: string | number; - strokeLinecap?: "butt" | "round" | "square" | "inherit"; - strokeLinejoin?: "miter" | "round" | "bevel" | "inherit"; - strokeMiterlimit?: string | number; - strokeOpacity?: number | string; - strokeWidth?: number | string; - surfaceScale?: number | string; - systemLanguage?: number | string; - tableValues?: number | string; - targetX?: number | string; - targetY?: number | string; - textAnchor?: string; - textDecoration?: number | string; - textLength?: number | string; - textRendering?: number | string; - to?: number | string; - transform?: string; - u1?: number | string; - u2?: number | string; - underlinePosition?: number | string; - underlineThickness?: number | string; - unicode?: number | string; - unicodeBidi?: number | string; - unicodeRange?: number | string; - unitsPerEm?: number | string; - vAlphabetic?: number | string; - values?: string; - vectorEffect?: number | string; - version?: string; - vertAdvY?: number | string; - vertOriginX?: number | string; - vertOriginY?: number | string; - vHanging?: number | string; - vIdeographic?: number | string; - viewBox?: string; - viewTarget?: number | string; - visibility?: number | string; - vMathematical?: number | string; - widths?: number | string; - wordSpacing?: number | string; - writingMode?: number | string; - x1?: number | string; - x2?: number | string; - x?: number | string; - xChannelSelector?: string; - xHeight?: number | string; - xlinkActuate?: string; - xlinkArcrole?: string; - xlinkHref?: string; - xlinkRole?: string; - xlinkShow?: string; - xlinkTitle?: string; - xlinkType?: string; - xmlBase?: string; - xmlLang?: string; - xmlns?: string; - xmlnsXlink?: string; - xmlSpace?: string; - y1?: number | string; - y2?: number | string; - y?: number | string; - yChannelSelector?: string; - z?: number | string; - zoomAndPan?: string; - } - - export interface PathAttributes { - d: string; - } - - export type TargetedEvent< - Target extends EventTarget = EventTarget, - TypedEvent extends Event = Event - > = Omit & { - readonly currentTarget: Target; - }; - - export type TargetedAnimationEvent = - TargetedEvent; - export type TargetedClipboardEvent = - TargetedEvent; - export type TargetedCompositionEvent = - TargetedEvent; - export type TargetedDragEvent = TargetedEvent< - Target, - DragEvent - >; - export type TargetedFocusEvent = TargetedEvent< - Target, - FocusEvent - >; - export type TargetedKeyboardEvent = TargetedEvent< - Target, - KeyboardEvent - >; - export type TargetedMouseEvent = TargetedEvent< - Target, - MouseEvent - >; - export type TargetedPointerEvent = TargetedEvent< - Target, - PointerEvent - >; - export type TargetedTouchEvent = TargetedEvent< - Target, - TouchEvent - >; - export type TargetedTransitionEvent = - TargetedEvent; - export type TargetedUIEvent = TargetedEvent< - Target, - UIEvent - >; - export type TargetedWheelEvent = TargetedEvent< - Target, - WheelEvent - >; - - export interface EventHandler { - /** - * The `this` keyword always points to the DOM element the event handler - * was invoked on. See: https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Event_handlers#Event_handlers_parameters_this_binding_and_the_return_value - */ - (this: E["currentTarget"], event: E): void; - } - - export type AnimationEventHandler = EventHandler< - TargetedAnimationEvent - >; - export type ClipboardEventHandler = EventHandler< - TargetedClipboardEvent - >; - export type CompositionEventHandler = - EventHandler>; - export type DragEventHandler = EventHandler< - TargetedDragEvent - >; - export type FocusEventHandler = EventHandler< - TargetedFocusEvent - >; - export type GenericEventHandler = EventHandler< - TargetedEvent - >; - export type KeyboardEventHandler = EventHandler< - TargetedKeyboardEvent - >; - export type MouseEventHandler = EventHandler< - TargetedMouseEvent - >; - export type PointerEventHandler = EventHandler< - TargetedPointerEvent - >; - export type TouchEventHandler = EventHandler< - TargetedTouchEvent - >; - export type TransitionEventHandler = EventHandler< - TargetedTransitionEvent - >; - export type UIEventHandler = EventHandler< - TargetedUIEvent - >; - export type WheelEventHandler = EventHandler< - TargetedWheelEvent - >; - - /* +export type LibraryManagedAttributes = Component extends { + defaultProps: infer Defaults; +} + ? Defaultize + : Props; + +export interface IntrinsicAttributes { + key?: any; +} + +export interface ElementAttributesProperty { + props: any; +} + +export interface ElementChildrenAttribute { + children: any; +} + +export type DOMCSSProperties = { + [key in keyof Omit< + CSSStyleDeclaration, + | "item" + | "setProperty" + | "removeProperty" + | "getPropertyValue" + | "getPropertyPriority" + >]?: string | number | null | undefined; +}; +export type AllCSSProperties = { + [key: string]: string | number | null | undefined; +}; +export interface CSSProperties extends AllCSSProperties, DOMCSSProperties { + cssText?: string | null; +} + +export interface SVGAttributes + extends HTMLAttributes { + accentHeight?: number | string; + accumulate?: "none" | "sum"; + additive?: "replace" | "sum"; + alignmentBaseline?: + | "auto" + | "baseline" + | "before-edge" + | "text-before-edge" + | "middle" + | "central" + | "after-edge" + | "text-after-edge" + | "ideographic" + | "alphabetic" + | "hanging" + | "mathematical" + | "inherit"; + allowReorder?: "no" | "yes"; + alphabetic?: number | string; + amplitude?: number | string; + arabicForm?: "initial" | "medial" | "terminal" | "isolated"; + ascent?: number | string; + attributeName?: string; + attributeType?: string; + autoReverse?: number | string; + azimuth?: number | string; + baseFrequency?: number | string; + baselineShift?: number | string; + baseProfile?: number | string; + bbox?: number | string; + begin?: number | string; + bias?: number | string; + by?: number | string; + calcMode?: number | string; + capHeight?: number | string; + clip?: number | string; + clipPath?: string; + clipPathUnits?: number | string; + clipRule?: number | string; + colorInterpolation?: number | string; + colorInterpolationFilters?: "auto" | "sRGB" | "linearRGB" | "inherit"; + colorProfile?: number | string; + colorRendering?: number | string; + contentScriptType?: number | string; + contentStyleType?: number | string; + cursor?: number | string; + cx?: number | string; + cy?: number | string; + d?: string; + decelerate?: number | string; + descent?: number | string; + diffuseConstant?: number | string; + direction?: number | string; + display?: number | string; + divisor?: number | string; + dominantBaseline?: number | string; + dur?: number | string; + dx?: number | string; + dy?: number | string; + edgeMode?: number | string; + elevation?: number | string; + enableBackground?: number | string; + end?: number | string; + exponent?: number | string; + externalResourcesRequired?: number | string; + fill?: string; + fillOpacity?: number | string; + fillRule?: "nonzero" | "evenodd" | "inherit"; + filter?: string; + filterRes?: number | string; + filterUnits?: number | string; + floodColor?: number | string; + floodOpacity?: number | string; + focusable?: number | string; + fontFamily?: string; + fontSize?: number | string; + fontSizeAdjust?: number | string; + fontStretch?: number | string; + fontStyle?: number | string; + fontVariant?: number | string; + fontWeight?: number | string; + format?: number | string; + from?: number | string; + fx?: number | string; + fy?: number | string; + g1?: number | string; + g2?: number | string; + glyphName?: number | string; + glyphOrientationHorizontal?: number | string; + glyphOrientationVertical?: number | string; + glyphRef?: number | string; + gradientTransform?: string; + gradientUnits?: string; + hanging?: number | string; + horizAdvX?: number | string; + horizOriginX?: number | string; + ideographic?: number | string; + imageRendering?: number | string; + in2?: number | string; + in?: string; + intercept?: number | string; + k1?: number | string; + k2?: number | string; + k3?: number | string; + k4?: number | string; + k?: number | string; + kernelMatrix?: number | string; + kernelUnitLength?: number | string; + kerning?: number | string; + keyPoints?: number | string; + keySplines?: number | string; + keyTimes?: number | string; + lengthAdjust?: number | string; + letterSpacing?: number | string; + lightingColor?: number | string; + limitingConeAngle?: number | string; + local?: number | string; + markerEnd?: string; + markerHeight?: number | string; + markerMid?: string; + markerStart?: string; + markerUnits?: number | string; + markerWidth?: number | string; + mask?: string; + maskContentUnits?: number | string; + maskUnits?: number | string; + mathematical?: number | string; + mode?: number | string; + numOctaves?: number | string; + offset?: number | string; + opacity?: number | string; + operator?: number | string; + order?: number | string; + orient?: number | string; + orientation?: number | string; + origin?: number | string; + overflow?: number | string; + overlinePosition?: number | string; + overlineThickness?: number | string; + paintOrder?: number | string; + panose1?: number | string; + pathLength?: number | string; + patternContentUnits?: string; + patternTransform?: number | string; + patternUnits?: string; + pointerEvents?: number | string; + points?: string; + pointsAtX?: number | string; + pointsAtY?: number | string; + pointsAtZ?: number | string; + preserveAlpha?: number | string; + preserveAspectRatio?: string; + primitiveUnits?: number | string; + r?: number | string; + radius?: number | string; + refX?: number | string; + refY?: number | string; + renderingIntent?: number | string; + repeatCount?: number | string; + repeatDur?: number | string; + requiredExtensions?: number | string; + requiredFeatures?: number | string; + restart?: number | string; + result?: string; + rotate?: number | string; + rx?: number | string; + ry?: number | string; + scale?: number | string; + seed?: number | string; + shapeRendering?: number | string; + slope?: number | string; + spacing?: number | string; + specularConstant?: number | string; + specularExponent?: number | string; + speed?: number | string; + spreadMethod?: string; + startOffset?: number | string; + stdDeviation?: number | string; + stemh?: number | string; + stemv?: number | string; + stitchTiles?: number | string; + stopColor?: string; + stopOpacity?: number | string; + strikethroughPosition?: number | string; + strikethroughThickness?: number | string; + string?: number | string; + stroke?: string; + strokeDasharray?: string | number; + strokeDashoffset?: string | number; + strokeLinecap?: "butt" | "round" | "square" | "inherit"; + strokeLinejoin?: "miter" | "round" | "bevel" | "inherit"; + strokeMiterlimit?: string | number; + strokeOpacity?: number | string; + strokeWidth?: number | string; + surfaceScale?: number | string; + systemLanguage?: number | string; + tableValues?: number | string; + targetX?: number | string; + targetY?: number | string; + textAnchor?: string; + textDecoration?: number | string; + textLength?: number | string; + textRendering?: number | string; + to?: number | string; + transform?: string; + u1?: number | string; + u2?: number | string; + underlinePosition?: number | string; + underlineThickness?: number | string; + unicode?: number | string; + unicodeBidi?: number | string; + unicodeRange?: number | string; + unitsPerEm?: number | string; + vAlphabetic?: number | string; + values?: string; + vectorEffect?: number | string; + version?: string; + vertAdvY?: number | string; + vertOriginX?: number | string; + vertOriginY?: number | string; + vHanging?: number | string; + vIdeographic?: number | string; + viewBox?: string; + viewTarget?: number | string; + visibility?: number | string; + vMathematical?: number | string; + widths?: number | string; + wordSpacing?: number | string; + writingMode?: number | string; + x1?: number | string; + x2?: number | string; + x?: number | string; + xChannelSelector?: string; + xHeight?: number | string; + xlinkActuate?: string; + xlinkArcrole?: string; + xlinkHref?: string; + xlinkRole?: string; + xlinkShow?: string; + xlinkTitle?: string; + xlinkType?: string; + xmlBase?: string; + xmlLang?: string; + xmlns?: string; + xmlnsXlink?: string; + xmlSpace?: string; + y1?: number | string; + y2?: number | string; + y?: number | string; + yChannelSelector?: string; + z?: number | string; + zoomAndPan?: string; +} + +export interface PathAttributes { + d: string; +} + +export type TargetedEvent< + Target extends EventTarget = EventTarget, + TypedEvent extends Event = Event +> = Omit & { + readonly currentTarget: Target; +}; + +export type TargetedAnimationEvent = TargetedEvent< + Target, + AnimationEvent +>; +export type TargetedClipboardEvent = TargetedEvent< + Target, + ClipboardEvent +>; +export type TargetedCompositionEvent = + TargetedEvent; +export type TargetedDragEvent = TargetedEvent< + Target, + DragEvent +>; +export type TargetedFocusEvent = TargetedEvent< + Target, + FocusEvent +>; +export type TargetedKeyboardEvent = TargetedEvent< + Target, + KeyboardEvent +>; +export type TargetedMouseEvent = TargetedEvent< + Target, + MouseEvent +>; +export type TargetedPointerEvent = TargetedEvent< + Target, + PointerEvent +>; +export type TargetedTouchEvent = TargetedEvent< + Target, + TouchEvent +>; +export type TargetedTransitionEvent = TargetedEvent< + Target, + TransitionEvent +>; +export type TargetedUIEvent = TargetedEvent< + Target, + UIEvent +>; +export type TargetedWheelEvent = TargetedEvent< + Target, + WheelEvent +>; + +export interface EventHandler { + /** + * The `this` keyword always points to the DOM element the event handler + * was invoked on. See: https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Event_handlers#Event_handlers_parameters_this_binding_and_the_return_value + */ + (this: E["currentTarget"], event: E): void; +} + +export type AnimationEventHandler = EventHandler< + TargetedAnimationEvent +>; +export type ClipboardEventHandler = EventHandler< + TargetedClipboardEvent +>; +export type CompositionEventHandler = EventHandler< + TargetedCompositionEvent +>; +export type DragEventHandler = EventHandler< + TargetedDragEvent +>; +export type FocusEventHandler = EventHandler< + TargetedFocusEvent +>; +export type GenericEventHandler = EventHandler< + TargetedEvent +>; +export type KeyboardEventHandler = EventHandler< + TargetedKeyboardEvent +>; +export type MouseEventHandler = EventHandler< + TargetedMouseEvent +>; +export type PointerEventHandler = EventHandler< + TargetedPointerEvent +>; +export type TouchEventHandler = EventHandler< + TargetedTouchEvent +>; +export type TransitionEventHandler = EventHandler< + TargetedTransitionEvent +>; +export type UIEventHandler = EventHandler< + TargetedUIEvent +>; +export type WheelEventHandler = EventHandler< + TargetedWheelEvent +>; + +/* The function used to convert a.split("\n") .map(x => x.trim()) @@ -413,450 +419,449 @@ export namespace JSXTypes { .join("\n") */ - export interface DOMAttributes - extends ForgoDOMElementProps { - // Image Events - onload?: GenericEventHandler; - onerror?: GenericEventHandler; - - // Clipboard Events - oncopy?: ClipboardEventHandler; - oncut?: ClipboardEventHandler; - onpaste?: ClipboardEventHandler; - - // Composition Events - oncompositionend?: CompositionEventHandler; - oncompositionstart?: CompositionEventHandler; - oncompositionupdate?: CompositionEventHandler; - - // Details Events - ontoggle?: GenericEventHandler; - - // Focus Events - onfocus?: FocusEventHandler; - onblur?: FocusEventHandler; - - // Form Events - onchange?: GenericEventHandler; - oninput?: GenericEventHandler; - onsearch?: GenericEventHandler; - onsubmit?: GenericEventHandler; - oninvalid?: GenericEventHandler; - onreset?: GenericEventHandler; - onformdata?: GenericEventHandler; - - // Keyboard Events - onkeydown?: KeyboardEventHandler; - onkeypress?: KeyboardEventHandler; - onkeyup?: KeyboardEventHandler; - - // Media Events - onabort?: GenericEventHandler; - oncanplay?: GenericEventHandler; - oncanplaythrough?: GenericEventHandler; - ondurationchange?: GenericEventHandler; - onemptied?: GenericEventHandler; - onencrypted?: GenericEventHandler; - onended?: GenericEventHandler; - onloadeddata?: GenericEventHandler; - onloadedmetadata?: GenericEventHandler; - onloadstart?: GenericEventHandler; - onpause?: GenericEventHandler; - onplay?: GenericEventHandler; - onplaying?: GenericEventHandler; - onprogress?: GenericEventHandler; - onratechange?: GenericEventHandler; - onseeked?: GenericEventHandler; - onseeking?: GenericEventHandler; - onstalled?: GenericEventHandler; - onsuspend?: GenericEventHandler; - ontimeupdate?: GenericEventHandler; - onvolumechange?: GenericEventHandler; - onwaiting?: GenericEventHandler; - - // MouseEvents - onclick?: MouseEventHandler; - oncontextmenu?: MouseEventHandler; - ondblclick?: MouseEventHandler; - ondrag?: DragEventHandler; - ondragend?: DragEventHandler; - ondragenter?: DragEventHandler; - ondragexit?: DragEventHandler; - ondragleave?: DragEventHandler; - ondragover?: DragEventHandler; - ondragstart?: DragEventHandler; - ondrop?: DragEventHandler; - onmousedown?: MouseEventHandler; - onmouseenter?: MouseEventHandler; - onmouseleave?: MouseEventHandler; - onmousemove?: MouseEventHandler; - onmouseout?: MouseEventHandler; - onmouseover?: MouseEventHandler; - onmouseup?: MouseEventHandler; - - // Selection Events - onselect?: GenericEventHandler; - - // Touch Events - ontouchcancel?: TouchEventHandler; - ontouchend?: TouchEventHandler; - ontouchmove?: TouchEventHandler; - ontouchstart?: TouchEventHandler; - - // Pointer Events - onpointerover?: PointerEventHandler; - onpointerenter?: PointerEventHandler; - onpointerdown?: PointerEventHandler; - onpointermove?: PointerEventHandler; - onpointerup?: PointerEventHandler; - onpointercancel?: PointerEventHandler; - onpointerout?: PointerEventHandler; - onpointerleave?: PointerEventHandler; - - // UI Events - onscroll?: UIEventHandler; - - // Wheel Events - onwheel?: WheelEventHandler; - - // Animation Events - onanimationstart?: AnimationEventHandler; - onanimationend?: AnimationEventHandler; - onanimationiteration?: AnimationEventHandler; - - // Transition Events - ontransitionend?: TransitionEventHandler; - } - - export interface HTMLAttributes - // extends ForgoClassAttributes, - extends DOMAttributes { - [key: string]: any; - // Standard HTML Attributes - accept?: string; - acceptcharset?: string; - accesskey?: string; - action?: string; - allowfullscreen?: boolean; - allowtransparency?: boolean; - alt?: string; - as?: string; - async?: boolean; - autocomplete?: string; - autocorrect?: string; - autofocus?: boolean; - autoplay?: boolean; - cellpadding?: number | string; - cellspacing?: number | string; - charset?: string; - challenge?: string; - checked?: boolean; - class?: string; - classname?: string; - cols?: number; - colspan?: number; - content?: string; - contenteditable?: boolean; - contextmenu?: string; - controls?: boolean; - controlslist?: string; - coords?: string; - crossorigin?: string; - data?: string; - datetime?: string; - default?: boolean; - defer?: boolean; - dir?: "auto" | "rtl" | "ltr"; - disabled?: boolean; - disableremoteplayback?: boolean; - download?: any; - draggable?: boolean; - enctype?: string; - form?: string; - formaction?: string; - formenctype?: string; - formmethod?: string; - formnovalidate?: boolean; - formtarget?: string; - frameborder?: number | string; - headers?: string; - height?: number | string; - hidden?: boolean; - high?: number; - href?: string; - hreflang?: string; - for?: string; - htmlfor?: string; - httpequiv?: string; - icon?: string; - id?: string; - inputmode?: string; - integrity?: string; - is?: string; - keyparams?: string; - keytype?: string; - kind?: string; - label?: string; - lang?: string; - list?: string; - loading?: "eager" | "lazy"; - loop?: boolean; - low?: number; - manifest?: string; - marginheight?: number; - marginwidth?: number; - max?: number | string; - maxlength?: number; - media?: string; - mediagroup?: string; - method?: string; - min?: number | string; - minlength?: number; - multiple?: boolean; - muted?: boolean; - name?: string; - nonce?: string; - novalidate?: boolean; - open?: boolean; - optimum?: number; - pattern?: string; - placeholder?: string; - playsinline?: boolean; - poster?: string; - preload?: string; - radiogroup?: string; - readonly?: boolean; - rel?: string; - required?: boolean; - role?: string; - rows?: number; - rowspan?: number; - sandbox?: string; - scope?: string; - scoped?: boolean; - scrolling?: string; - seamless?: boolean; - selected?: boolean; - shape?: string; - size?: number; - sizes?: string; - slot?: string; - span?: number; - spellcheck?: boolean; - src?: string; - srcset?: string; - srcdoc?: string; - srclang?: string; - start?: number; - step?: number | string; - style?: string | CSSProperties; - summary?: string; - tabindex?: number; - target?: string; - title?: string; - type?: string; - usemap?: string; - value?: string | string[] | number; - volume?: string | number; - width?: number | string; - wmode?: string; - wrap?: string; - - // RDFa Attributes - about?: string; - datatype?: string; - inlist?: any; - prefix?: string; - property?: string; - resource?: string; - typeof?: string; - vocab?: string; - - // Microdata Attributes - itemprop?: string; - itemscope?: boolean; - itemtype?: string; - itemid?: string; - itemref?: string; - } - - export interface HTMLMarqueeElement extends HTMLElement { - behavior?: "scroll" | "slide" | "alternate"; - bgcolor?: string; - direction?: "left" | "right" | "up" | "down"; - height?: number | string; - hspace?: number | string; - loop?: number | string; - scrollamount?: number | string; - scrolldelay?: number | string; - truespeed?: boolean; - vspace?: number | string; - width?: number | string; - } - - export interface IntrinsicElements { - // HTML - a: HTMLAttributes; - abbr: HTMLAttributes; - address: HTMLAttributes; - area: HTMLAttributes; - article: HTMLAttributes; - aside: HTMLAttributes; - audio: HTMLAttributes; - b: HTMLAttributes; - base: HTMLAttributes; - bdi: HTMLAttributes; - bdo: HTMLAttributes; - big: HTMLAttributes; - blockquote: HTMLAttributes; - body: HTMLAttributes; - br: HTMLAttributes; - button: HTMLAttributes; - canvas: HTMLAttributes; - caption: HTMLAttributes; - cite: HTMLAttributes; - code: HTMLAttributes; - col: HTMLAttributes; - colgroup: HTMLAttributes; - data: HTMLAttributes; - datalist: HTMLAttributes; - dd: HTMLAttributes; - del: HTMLAttributes; - details: HTMLAttributes; - dfn: HTMLAttributes; - dialog: HTMLAttributes; - div: HTMLAttributes; - dl: HTMLAttributes; - dt: HTMLAttributes; - em: HTMLAttributes; - embed: HTMLAttributes; - fieldset: HTMLAttributes; - figcaption: HTMLAttributes; - figure: HTMLAttributes; - footer: HTMLAttributes; - form: HTMLAttributes; - h1: HTMLAttributes; - h2: HTMLAttributes; - h3: HTMLAttributes; - h4: HTMLAttributes; - h5: HTMLAttributes; - h6: HTMLAttributes; - head: HTMLAttributes; - header: HTMLAttributes; - hgroup: HTMLAttributes; - hr: HTMLAttributes; - html: HTMLAttributes; - i: HTMLAttributes; - iframe: HTMLAttributes; - img: HTMLAttributes; - input: HTMLAttributes; - ins: HTMLAttributes; - kbd: HTMLAttributes; - keygen: HTMLAttributes; - label: HTMLAttributes; - legend: HTMLAttributes; - li: HTMLAttributes; - link: HTMLAttributes; - main: HTMLAttributes; - map: HTMLAttributes; - mark: HTMLAttributes; - marquee: HTMLAttributes; - menu: HTMLAttributes; - menuitem: HTMLAttributes; - meta: HTMLAttributes; - meter: HTMLAttributes; - nav: HTMLAttributes; - noscript: HTMLAttributes; - object: HTMLAttributes; - ol: HTMLAttributes; - optgroup: HTMLAttributes; - option: HTMLAttributes; - output: HTMLAttributes; - p: HTMLAttributes; - param: HTMLAttributes; - picture: HTMLAttributes; - pre: HTMLAttributes; - progress: HTMLAttributes; - q: HTMLAttributes; - rp: HTMLAttributes; - rt: HTMLAttributes; - ruby: HTMLAttributes; - s: HTMLAttributes; - samp: HTMLAttributes; - script: HTMLAttributes; - section: HTMLAttributes; - select: HTMLAttributes; - slot: HTMLAttributes; - small: HTMLAttributes; - source: HTMLAttributes; - span: HTMLAttributes; - strong: HTMLAttributes; - style: HTMLAttributes; - sub: HTMLAttributes; - summary: HTMLAttributes; - sup: HTMLAttributes; - table: HTMLAttributes; - tbody: HTMLAttributes; - td: HTMLAttributes; - textarea: HTMLAttributes; - tfoot: HTMLAttributes; - th: HTMLAttributes; - thead: HTMLAttributes; - time: HTMLAttributes; - title: HTMLAttributes; - tr: HTMLAttributes; - track: HTMLAttributes; - u: HTMLAttributes; - ul: HTMLAttributes; - var: HTMLAttributes; - video: HTMLAttributes; - wbr: HTMLAttributes; - - //SVG - svg: SVGAttributes; - animate: SVGAttributes; - circle: SVGAttributes; - animateTransform: SVGAttributes; - clipPath: SVGAttributes; - defs: SVGAttributes; - desc: SVGAttributes; - ellipse: SVGAttributes; - feBlend: SVGAttributes; - feColorMatrix: SVGAttributes; - feComponentTransfer: SVGAttributes; - feComposite: SVGAttributes; - feConvolveMatrix: SVGAttributes; - feDiffuseLighting: SVGAttributes; - feDisplacementMap: SVGAttributes; - feDropShadow: SVGAttributes; - feFlood: SVGAttributes; - feGaussianBlur: SVGAttributes; - feImage: SVGAttributes; - feMerge: SVGAttributes; - feMergeNode: SVGAttributes; - feMorphology: SVGAttributes; - feOffset: SVGAttributes; - feSpecularLighting: SVGAttributes; - feTile: SVGAttributes; - feTurbulence: SVGAttributes; - filter: SVGAttributes; - foreignObject: SVGAttributes; - g: SVGAttributes; - image: SVGAttributes; - line: SVGAttributes; - linearGradient: SVGAttributes; - marker: SVGAttributes; - mask: SVGAttributes; - path: SVGAttributes; - pattern: SVGAttributes; - polygon: SVGAttributes; - polyline: SVGAttributes; - radialGradient: SVGAttributes; - rect: SVGAttributes; - stop: SVGAttributes; - symbol: SVGAttributes; - text: SVGAttributes; - tspan: SVGAttributes; - use: SVGAttributes; - } +export interface DOMAttributes + extends ForgoDOMElementProps { + // Image Events + onload?: GenericEventHandler; + onerror?: GenericEventHandler; + + // Clipboard Events + oncopy?: ClipboardEventHandler; + oncut?: ClipboardEventHandler; + onpaste?: ClipboardEventHandler; + + // Composition Events + oncompositionend?: CompositionEventHandler; + oncompositionstart?: CompositionEventHandler; + oncompositionupdate?: CompositionEventHandler; + + // Details Events + ontoggle?: GenericEventHandler; + + // Focus Events + onfocus?: FocusEventHandler; + onblur?: FocusEventHandler; + + // Form Events + onchange?: GenericEventHandler; + oninput?: GenericEventHandler; + onsearch?: GenericEventHandler; + onsubmit?: GenericEventHandler; + oninvalid?: GenericEventHandler; + onreset?: GenericEventHandler; + onformdata?: GenericEventHandler; + + // Keyboard Events + onkeydown?: KeyboardEventHandler; + onkeypress?: KeyboardEventHandler; + onkeyup?: KeyboardEventHandler; + + // Media Events + onabort?: GenericEventHandler; + oncanplay?: GenericEventHandler; + oncanplaythrough?: GenericEventHandler; + ondurationchange?: GenericEventHandler; + onemptied?: GenericEventHandler; + onencrypted?: GenericEventHandler; + onended?: GenericEventHandler; + onloadeddata?: GenericEventHandler; + onloadedmetadata?: GenericEventHandler; + onloadstart?: GenericEventHandler; + onpause?: GenericEventHandler; + onplay?: GenericEventHandler; + onplaying?: GenericEventHandler; + onprogress?: GenericEventHandler; + onratechange?: GenericEventHandler; + onseeked?: GenericEventHandler; + onseeking?: GenericEventHandler; + onstalled?: GenericEventHandler; + onsuspend?: GenericEventHandler; + ontimeupdate?: GenericEventHandler; + onvolumechange?: GenericEventHandler; + onwaiting?: GenericEventHandler; + + // MouseEvents + onclick?: MouseEventHandler; + oncontextmenu?: MouseEventHandler; + ondblclick?: MouseEventHandler; + ondrag?: DragEventHandler; + ondragend?: DragEventHandler; + ondragenter?: DragEventHandler; + ondragexit?: DragEventHandler; + ondragleave?: DragEventHandler; + ondragover?: DragEventHandler; + ondragstart?: DragEventHandler; + ondrop?: DragEventHandler; + onmousedown?: MouseEventHandler; + onmouseenter?: MouseEventHandler; + onmouseleave?: MouseEventHandler; + onmousemove?: MouseEventHandler; + onmouseout?: MouseEventHandler; + onmouseover?: MouseEventHandler; + onmouseup?: MouseEventHandler; + + // Selection Events + onselect?: GenericEventHandler; + + // Touch Events + ontouchcancel?: TouchEventHandler; + ontouchend?: TouchEventHandler; + ontouchmove?: TouchEventHandler; + ontouchstart?: TouchEventHandler; + + // Pointer Events + onpointerover?: PointerEventHandler; + onpointerenter?: PointerEventHandler; + onpointerdown?: PointerEventHandler; + onpointermove?: PointerEventHandler; + onpointerup?: PointerEventHandler; + onpointercancel?: PointerEventHandler; + onpointerout?: PointerEventHandler; + onpointerleave?: PointerEventHandler; + + // UI Events + onscroll?: UIEventHandler; + + // Wheel Events + onwheel?: WheelEventHandler; + + // Animation Events + onanimationstart?: AnimationEventHandler; + onanimationend?: AnimationEventHandler; + onanimationiteration?: AnimationEventHandler; + + // Transition Events + ontransitionend?: TransitionEventHandler; +} + +export interface HTMLAttributes + // extends ForgoClassAttributes, + extends DOMAttributes { + [key: string]: any; + // Standard HTML Attributes + accept?: string; + acceptcharset?: string; + accesskey?: string; + action?: string; + allowfullscreen?: boolean; + allowtransparency?: boolean; + alt?: string; + as?: string; + async?: boolean; + autocomplete?: string; + autocorrect?: string; + autofocus?: boolean; + autoplay?: boolean; + cellpadding?: number | string; + cellspacing?: number | string; + charset?: string; + challenge?: string; + checked?: boolean; + class?: string; + classname?: string; + cols?: number; + colspan?: number; + content?: string; + contenteditable?: boolean; + contextmenu?: string; + controls?: boolean; + controlslist?: string; + coords?: string; + crossorigin?: string; + data?: string; + datetime?: string; + default?: boolean; + defer?: boolean; + dir?: "auto" | "rtl" | "ltr"; + disabled?: boolean; + disableremoteplayback?: boolean; + download?: any; + draggable?: boolean; + enctype?: string; + form?: string; + formaction?: string; + formenctype?: string; + formmethod?: string; + formnovalidate?: boolean; + formtarget?: string; + frameborder?: number | string; + headers?: string; + height?: number | string; + hidden?: boolean; + high?: number; + href?: string; + hreflang?: string; + for?: string; + htmlfor?: string; + httpequiv?: string; + icon?: string; + id?: string; + inputmode?: string; + integrity?: string; + is?: string; + keyparams?: string; + keytype?: string; + kind?: string; + label?: string; + lang?: string; + list?: string; + loading?: "eager" | "lazy"; + loop?: boolean; + low?: number; + manifest?: string; + marginheight?: number; + marginwidth?: number; + max?: number | string; + maxlength?: number; + media?: string; + mediagroup?: string; + method?: string; + min?: number | string; + minlength?: number; + multiple?: boolean; + muted?: boolean; + name?: string; + nonce?: string; + novalidate?: boolean; + open?: boolean; + optimum?: number; + pattern?: string; + placeholder?: string; + playsinline?: boolean; + poster?: string; + preload?: string; + radiogroup?: string; + readonly?: boolean; + rel?: string; + required?: boolean; + role?: string; + rows?: number; + rowspan?: number; + sandbox?: string; + scope?: string; + scoped?: boolean; + scrolling?: string; + seamless?: boolean; + selected?: boolean; + shape?: string; + size?: number; + sizes?: string; + slot?: string; + span?: number; + spellcheck?: boolean; + src?: string; + srcset?: string; + srcdoc?: string; + srclang?: string; + start?: number; + step?: number | string; + style?: string | CSSProperties; + summary?: string; + tabindex?: number; + target?: string; + title?: string; + type?: string; + usemap?: string; + value?: string | string[] | number; + volume?: string | number; + width?: number | string; + wmode?: string; + wrap?: string; + + // RDFa Attributes + about?: string; + datatype?: string; + inlist?: any; + prefix?: string; + property?: string; + resource?: string; + typeof?: string; + vocab?: string; + + // Microdata Attributes + itemprop?: string; + itemscope?: boolean; + itemtype?: string; + itemid?: string; + itemref?: string; +} + +export interface HTMLMarqueeElement extends HTMLElement { + behavior?: "scroll" | "slide" | "alternate"; + bgcolor?: string; + direction?: "left" | "right" | "up" | "down"; + height?: number | string; + hspace?: number | string; + loop?: number | string; + scrollamount?: number | string; + scrolldelay?: number | string; + truespeed?: boolean; + vspace?: number | string; + width?: number | string; +} + +export interface IntrinsicElements { + // HTML + a: HTMLAttributes; + abbr: HTMLAttributes; + address: HTMLAttributes; + area: HTMLAttributes; + article: HTMLAttributes; + aside: HTMLAttributes; + audio: HTMLAttributes; + b: HTMLAttributes; + base: HTMLAttributes; + bdi: HTMLAttributes; + bdo: HTMLAttributes; + big: HTMLAttributes; + blockquote: HTMLAttributes; + body: HTMLAttributes; + br: HTMLAttributes; + button: HTMLAttributes; + canvas: HTMLAttributes; + caption: HTMLAttributes; + cite: HTMLAttributes; + code: HTMLAttributes; + col: HTMLAttributes; + colgroup: HTMLAttributes; + data: HTMLAttributes; + datalist: HTMLAttributes; + dd: HTMLAttributes; + del: HTMLAttributes; + details: HTMLAttributes; + dfn: HTMLAttributes; + dialog: HTMLAttributes; + div: HTMLAttributes; + dl: HTMLAttributes; + dt: HTMLAttributes; + em: HTMLAttributes; + embed: HTMLAttributes; + fieldset: HTMLAttributes; + figcaption: HTMLAttributes; + figure: HTMLAttributes; + footer: HTMLAttributes; + form: HTMLAttributes; + h1: HTMLAttributes; + h2: HTMLAttributes; + h3: HTMLAttributes; + h4: HTMLAttributes; + h5: HTMLAttributes; + h6: HTMLAttributes; + head: HTMLAttributes; + header: HTMLAttributes; + hgroup: HTMLAttributes; + hr: HTMLAttributes; + html: HTMLAttributes; + i: HTMLAttributes; + iframe: HTMLAttributes; + img: HTMLAttributes; + input: HTMLAttributes; + ins: HTMLAttributes; + kbd: HTMLAttributes; + keygen: HTMLAttributes; + label: HTMLAttributes; + legend: HTMLAttributes; + li: HTMLAttributes; + link: HTMLAttributes; + main: HTMLAttributes; + map: HTMLAttributes; + mark: HTMLAttributes; + marquee: HTMLAttributes; + menu: HTMLAttributes; + menuitem: HTMLAttributes; + meta: HTMLAttributes; + meter: HTMLAttributes; + nav: HTMLAttributes; + noscript: HTMLAttributes; + object: HTMLAttributes; + ol: HTMLAttributes; + optgroup: HTMLAttributes; + option: HTMLAttributes; + output: HTMLAttributes; + p: HTMLAttributes; + param: HTMLAttributes; + picture: HTMLAttributes; + pre: HTMLAttributes; + progress: HTMLAttributes; + q: HTMLAttributes; + rp: HTMLAttributes; + rt: HTMLAttributes; + ruby: HTMLAttributes; + s: HTMLAttributes; + samp: HTMLAttributes; + script: HTMLAttributes; + section: HTMLAttributes; + select: HTMLAttributes; + slot: HTMLAttributes; + small: HTMLAttributes; + source: HTMLAttributes; + span: HTMLAttributes; + strong: HTMLAttributes; + style: HTMLAttributes; + sub: HTMLAttributes; + summary: HTMLAttributes; + sup: HTMLAttributes; + table: HTMLAttributes; + tbody: HTMLAttributes; + td: HTMLAttributes; + textarea: HTMLAttributes; + tfoot: HTMLAttributes; + th: HTMLAttributes; + thead: HTMLAttributes; + time: HTMLAttributes; + title: HTMLAttributes; + tr: HTMLAttributes; + track: HTMLAttributes; + u: HTMLAttributes; + ul: HTMLAttributes; + var: HTMLAttributes; + video: HTMLAttributes; + wbr: HTMLAttributes; + + //SVG + svg: SVGAttributes; + animate: SVGAttributes; + circle: SVGAttributes; + animateTransform: SVGAttributes; + clipPath: SVGAttributes; + defs: SVGAttributes; + desc: SVGAttributes; + ellipse: SVGAttributes; + feBlend: SVGAttributes; + feColorMatrix: SVGAttributes; + feComponentTransfer: SVGAttributes; + feComposite: SVGAttributes; + feConvolveMatrix: SVGAttributes; + feDiffuseLighting: SVGAttributes; + feDisplacementMap: SVGAttributes; + feDropShadow: SVGAttributes; + feFlood: SVGAttributes; + feGaussianBlur: SVGAttributes; + feImage: SVGAttributes; + feMerge: SVGAttributes; + feMergeNode: SVGAttributes; + feMorphology: SVGAttributes; + feOffset: SVGAttributes; + feSpecularLighting: SVGAttributes; + feTile: SVGAttributes; + feTurbulence: SVGAttributes; + filter: SVGAttributes; + foreignObject: SVGAttributes; + g: SVGAttributes; + image: SVGAttributes; + line: SVGAttributes; + linearGradient: SVGAttributes; + marker: SVGAttributes; + mask: SVGAttributes; + path: SVGAttributes; + pattern: SVGAttributes; + polygon: SVGAttributes; + polyline: SVGAttributes; + radialGradient: SVGAttributes; + rect: SVGAttributes; + stop: SVGAttributes; + symbol: SVGAttributes; + text: SVGAttributes; + tspan: SVGAttributes; + use: SVGAttributes; } diff --git a/tsconfig.json b/tsconfig.json index 6c9998c..9598d8f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,7 +12,12 @@ "jsx": "react", "jsxFactory": "forgo.createElement", "jsxFragmentFactory": "forgo.Fragment", - "declaration": true + "declaration": true, + // esbuild recommends enabling this to help enforce throwing errors in + // scenarios where esbuild and tsc's behavior would differ + // + // https://esbuild.github.io/content-types/#isolated-modules + "isolatedModules": true }, "include": ["./src/**/*"] }