Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion etc/vicinage.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const apply: (...styledeck: StyleDeck[]) => ReturnType<typeof props>;
export const sheet: <T extends StyleDeck[]>(...styledeck: T) => T;

// @public (undocumented)
export type StyleDeck<T extends ~PropertiesWithExtras = ~PropertiesWithExtras> = StyleDeck<T>[] | ~StyleCard<T> | readonly [~StyleCard<T>, InlineStyles] | Theme<VarGroup<{}>> | ~NonApplicableThemeProperties | ~NonApplicableObjectProperties | ~NonApplicableSymbolProperties;
export type StyleDeck<T extends ~PropertiesWithExtras = ~PropertiesWithExtras> = StyleDeck<T>[] | ~StyleCard<T> | readonly [~StyleCard<T>, InlineStyles] | Theme<VarGroup<{}>> | ~NonApplicableThemeProperties | ~NonApplicableObjectProperties | ~NonApplicableSymbolProperties | undefined;

// @internal (undocumented)
export type ~CommonProperties = Properties & Omit<CSSPropertiesWithExtras, keyof Properties | `::${string}`>;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ type StyleDeck<T extends StyleConfig = StyleConfig> =
| NonApplicableThemeProperties
| NonApplicableObjectProperties
| NonApplicableSymbolProperties
| undefined

/**
* Apply styles as props `{ className, style }`, or attrs `{ class, style }`.
Expand Down
5 changes: 5 additions & 0 deletions src/styledeck.spec-d.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ const tokens = defineVars({
})

describe('StyleDeck', () => {
it('accepts undefined', () => {
// eslint-disable-next-line unicorn/no-useless-undefined
assertType<StyleDeck>(undefined)
})

it('accepts standard properties', () => {
assertType<StyleDeck>({
color: 'red',
Expand Down