INNER CODE UNIT · TypeScript
variants
ben-rogerson/twin.macro · src/suggestions/index.ts:71
const variants = classPieces.slice(0, -1)
// Check if variants or classes with match issues
if (variants.length > 0) {
const variantSuggestions = getVariantSuggestions(
variants,
className,
context
)
if (variantSuggestions) return variantSuggestions
}
return getClassSuggestions(className, context)
}
export type ErrorContext = {
CustomError: typeof Error
tailwindContext: TailwindContext