From fa665e029f37be94cfc6579598662413ab3ea870 Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Mon, 11 Mar 2024 18:13:06 +0100 Subject: [PATCH] fix typo --- packages/tailwindcss/src/compile.ts | 6 +++--- packages/tailwindcss/src/index.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/tailwindcss/src/compile.ts b/packages/tailwindcss/src/compile.ts index fc0cd4c7f03b..ebbe2a74c52b 100644 --- a/packages/tailwindcss/src/compile.ts +++ b/packages/tailwindcss/src/compile.ts @@ -8,7 +8,7 @@ import type { Variants } from './variants' export function compileCandidates( rawCandidates: Iterable, designSystem: DesignSystem, - { onInvalidCanidate }: { onInvalidCanidate?: (candidate: string) => void } = {}, + { onInvalidCandidate }: { onInvalidCandidate?: (candidate: string) => void } = {}, ) { let nodeSorting = new Map< AstNode, @@ -21,7 +21,7 @@ export function compileCandidates( for (let rawCandidate of rawCandidates) { let candidate = designSystem.parseCandidate(rawCandidate) if (candidate === null) { - onInvalidCanidate?.(rawCandidate) + onInvalidCandidate?.(rawCandidate) continue // Bail, invalid candidate } candidates.set(candidate, rawCandidate) @@ -36,7 +36,7 @@ export function compileCandidates( next: for (let [candidate, rawCandidate] of candidates) { let astNode = designSystem.compileAstNodes(rawCandidate) if (astNode === null) { - onInvalidCanidate?.(rawCandidate) + onInvalidCandidate?.(rawCandidate) continue next } diff --git a/packages/tailwindcss/src/index.ts b/packages/tailwindcss/src/index.ts index 301b73022b64..9678028f0216 100644 --- a/packages/tailwindcss/src/index.ts +++ b/packages/tailwindcss/src/index.ts @@ -17,7 +17,7 @@ export function compile(css: string): { // Track all invalid candidates let invalidCandidates = new Set() - function onInvalidCanidate(candidate: string) { + function onInvalidCandidate(candidate: string) { invalidCandidates.add(candidate) } @@ -133,7 +133,7 @@ export function compile(css: string): { { // Parse the candidates to an AST that we can replace the `@apply` rule with. let candidateAst = compileCandidates(candidates, designSystem, { - onInvalidCanidate: (candidate) => { + onInvalidCandidate: (candidate) => { throw new Error(`Cannot apply unknown utility class: ${candidate}`) }, }).astNodes @@ -203,7 +203,7 @@ export function compile(css: string): { if (tailwindUtilitiesNode) { let newNodes = compileCandidates(allValidCandidates, designSystem, { - onInvalidCanidate, + onInvalidCandidate, }).astNodes // If no new ast nodes were generated, then we can return the original