compmd-components
The component reader of CompMD: what a host-language component takes, read from its source with oxc, for component analysis (spec §7.1, W104).
- React (JSX, TSX): the default export's first parameter, the names it destructures and a
...rest, or the props a type literal, an interface or a type alias of the file lists. - Svelte 5: what the instance
<script>gives$props(), the same way. - Types, where TypeScript states one a signature's type can be checked against:
string,number,boolean, string literals and their unions, and a slot'sReactNode,ReactElement,JSX.ElementorSnippet.
It reads what the source states, and guesses nothing: a component whose props it can't read is left unchecked. ComponentReader implements the processor's compmd::analysis::ComponentProps:
use ;
use ComponentReader;
let resolved = new
.parse
.analysing
.resolve;
@compmd/processor/components is the same reader as WebAssembly.
Status
In development, released with CompMD's packages at the same version.
Versions:
- 0.13.0: the release's version; nothing else changed.
- 0.12.0: the first version.