-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
96 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import {createAutomaticRuntime} from './create-automatic-runtime.js' | ||
import {h} from './index.js' | ||
|
||
// Export `JSX` as a global for TypeScript. | ||
export * from './jsx-automatic.js' | ||
|
||
export const {Fragment, jsx, jsxDEV, jsxs} = createAutomaticRuntime(h) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import {createAutomaticRuntime} from './create-automatic-runtime.js' | ||
import {s} from './index.js' | ||
|
||
// Export `JSX` as a global for TypeScript. | ||
export * from './jsx-automatic.js' | ||
|
||
export const {Fragment, jsx, jsxDEV, jsxs} = createAutomaticRuntime(s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,36 @@ | ||
/** | ||
* @typedef {import('./core.js').HChild} Child | ||
* @typedef {import('./create-h.js').Child} Child | ||
* Acceptable child value. | ||
* @typedef {import('./core.js').HProperties} Properties | ||
* @typedef {import('./create-h.js').Properties} Properties | ||
* Acceptable value for element properties. | ||
* @typedef {import('./core.js').HResult} Result | ||
* @typedef {import('./create-h.js').Result} Result | ||
* Result from a `h` (or `s`) call. | ||
*/ | ||
|
||
// Register the JSX namespace. | ||
// Register the JSX namespace on `h`. | ||
/** | ||
* @typedef {import('./jsx-classic.js').Element} h.JSX.Element | ||
* @typedef {import('./jsx-classic.js').ElementChildrenAttribute} h.JSX.ElementChildrenAttribute | ||
* @typedef {import('./jsx-classic.js').IntrinsicAttributes} h.JSX.IntrinsicAttributes | ||
* @typedef {import('./jsx-classic.js').IntrinsicElements} h.JSX.IntrinsicElements | ||
* | ||
*/ | ||
|
||
// Register the JSX namespace on `s`. | ||
/** | ||
* @typedef {import('./jsx-classic.js').Element} s.JSX.Element | ||
* @typedef {import('./jsx-classic.js').ElementChildrenAttribute} s.JSX.ElementChildrenAttribute | ||
* @typedef {import('./jsx-classic.js').IntrinsicAttributes} s.JSX.IntrinsicAttributes | ||
* @typedef {import('./jsx-classic.js').IntrinsicElements} s.JSX.IntrinsicElements | ||
*/ | ||
|
||
import {html, svg} from 'property-information' | ||
import {core} from './core.js' | ||
import {createH} from './create-h.js' | ||
import {svgCaseSensitiveTagNames} from './svg-case-sensitive-tag-names.js' | ||
|
||
// Note: this explicit type is needed, otherwise TS creates broken types. | ||
/** @type {ReturnType<core>} */ | ||
export const h = core(html, 'div') | ||
/** @type {ReturnType<createH>} */ | ||
export const h = createH(html, 'div') | ||
|
||
// Note: this explicit type is needed, otherwise TS creates broken types. | ||
/** @type {ReturnType<core>} */ | ||
export const s = core(svg, 'g', svgCaseSensitiveTagNames) | ||
/** @type {ReturnType<createH>} */ | ||
export const s = createH(svg, 'g', svgCaseSensitiveTagNames) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.