feat(compiler): add skin project compilation

This commit is contained in:
Rahim
2026-06-21 17:36:49 -07:00
parent e0a5710c66
commit fcee71e1eb
31 changed files with 1693 additions and 261 deletions
@@ -69,12 +69,15 @@ const Gesture = createComponent(
describe('constrained JSX', () => {
it('accepts a single component', () => {
void (<PlayButton className="x" />);
void (<PlayButton className={['x', undefined, false, ['y']]} />);
void (<PlayButton key="play" />);
});
it('rejects invalid props on a single component', () => {
// @ts-expect-error - className must be a string
// @ts-expect-error - className must be a string or className array
void (<PlayButton className={5} />);
// @ts-expect-error - className array values must be className-compatible
void (<PlayButton className={['x', 5]} />);
// @ts-expect-error - id is a target-specific attr, not a core JSX prop
void (<PlayButton id="play" />);
// @ts-expect-error - hidden is a target-specific attr, not a core JSX prop
+3 -1
View File
@@ -23,8 +23,10 @@ export interface ComponentNode {
readonly key: string | number | null;
}
export type ClassNameValue = string | false | null | undefined | readonly ClassNameValue[];
export interface BaseProps {
className?: string | undefined;
className?: ClassNameValue;
children?: unknown;
}