🎉 initiate project *astro_rewrite*
This commit is contained in:
parent
ffd4d5e86c
commit
2ba37bfbe3
8658 changed files with 2268794 additions and 2538 deletions
47
node_modules/hastscript/lib/jsx-classic.d.ts
generated
vendored
Normal file
47
node_modules/hastscript/lib/jsx-classic.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
import type {HProperties, HChild, HResult} from './core.js'
|
||||
|
||||
/**
|
||||
* This unique symbol is declared to specify the key on which JSX children are passed, without conflicting
|
||||
* with the Attributes type.
|
||||
*/
|
||||
declare const children: unique symbol
|
||||
|
||||
/**
|
||||
* This defines the return value of JSX syntax.
|
||||
*/
|
||||
export type Element = HResult
|
||||
|
||||
/**
|
||||
* This disallows the use of functional components.
|
||||
*/
|
||||
export type IntrinsicAttributes = never
|
||||
|
||||
/**
|
||||
* This defines the prop types for known elements.
|
||||
*
|
||||
* For `hastscript` this defines any string may be used in combination with `hast` `Properties`.
|
||||
*
|
||||
* This **must** be an interface.
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style, @typescript-eslint/consistent-type-definitions
|
||||
export interface IntrinsicElements {
|
||||
[name: string]:
|
||||
| HProperties
|
||||
| {
|
||||
/**
|
||||
* The prop that matches `ElementChildrenAttribute` key defines the type of JSX children, defines the children type.
|
||||
*/
|
||||
[children]?: HChild
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The key of this interface defines as what prop children are passed.
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
|
||||
export interface ElementChildrenAttribute {
|
||||
/**
|
||||
* Only the key matters, not the value.
|
||||
*/
|
||||
[children]?: never
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue