Skip to content

Commit

Permalink
Cleanup types a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
thecrypticace committed Mar 5, 2024
1 parent c3c1755 commit 678d42f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export async function loadDesignSystem(
let resolved = await resolveImports.process(css, { from: filepath })

// Step 3: Take the resolved CSS and pass it to v4's `loadDesignSystem`
let design = tailwindcss.__unstable__loadDesignSystem(resolved.css)
let design = tailwindcss.__unstable__loadDesignSystem(resolved.css) as DesignSystem

// Step 4: Augment the design system with some additional APIs that the LSP needs
Object.assign(design, {
Expand All @@ -48,7 +48,7 @@ export async function loadDesignSystem(
},

compile(classes: string[]): postcss.Root[] {
let css = design.candidatesToCss(classes) as (string | null)[]
let css = design.candidatesToCss(classes)

// Downlevel syntax
// TODO: Either don't downlevel nesting or make `recordClassDetails` more robust
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export interface DesignSystem {
theme: Theme
variants: Map<string, VariantFn>
utilities: Map<string, unknown>
candidatesToCss(classes: string[]): (string | null)[]
getClassOrder(classes: string[]): [string, bigint | null][]
getClassList(): ClassEntry[]
getVariants(): VariantEntry[]
Expand Down

0 comments on commit 678d42f

Please sign in to comment.