diff --git a/etc/vicinage.api.md b/etc/vicinage.api.md index 9272bd1..df32bc5 100644 --- a/etc/vicinage.api.md +++ b/etc/vicinage.api.md @@ -22,7 +22,7 @@ export const apply: (...styledeck: StyleDeck[]) => ReturnType; export const sheet: (...styledeck: T) => T; // @public (undocumented) -export type StyleDeck = StyleDeck[] | ~StyleCard | readonly [~StyleCard, InlineStyles] | Theme> | ~NonApplicableThemeProperties | ~NonApplicableObjectProperties | ~NonApplicableSymbolProperties; +export type StyleDeck = StyleDeck[] | ~StyleCard | readonly [~StyleCard, InlineStyles] | Theme> | ~NonApplicableThemeProperties | ~NonApplicableObjectProperties | ~NonApplicableSymbolProperties | undefined; // @internal (undocumented) export type ~CommonProperties = Properties & Omit; diff --git a/package.json b/package.json index ba4a549..62cf0bd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vicinage", - "version": "0.6.19", + "version": "0.6.20", "description": "Type-safe and zero-runtime UI styling, right in the markup.", "license": "MIT", "repository": { diff --git a/src/index.ts b/src/index.ts index 090f164..78b8e35 100644 --- a/src/index.ts +++ b/src/index.ts @@ -35,6 +35,7 @@ type StyleDeck = | NonApplicableThemeProperties | NonApplicableObjectProperties | NonApplicableSymbolProperties + | undefined /** * Apply styles as props `{ className, style }`, or attrs `{ class, style }`. diff --git a/src/styledeck.spec-d.tsx b/src/styledeck.spec-d.tsx index ab949c8..8a21440 100644 --- a/src/styledeck.spec-d.tsx +++ b/src/styledeck.spec-d.tsx @@ -3,6 +3,11 @@ const tokens = defineVars({ }) describe('StyleDeck', () => { + it('accepts undefined', () => { + // eslint-disable-next-line unicorn/no-useless-undefined + assertType(undefined) + }) + it('accepts standard properties', () => { assertType({ color: 'red',