allow any iterable string as input

This way we can pass it an array or a set without first converting it.
This commit is contained in:
Robin Malfait 2024-03-07 23:27:14 +01:00
parent 02b1794684
commit 50da0a1be2
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -91,7 +91,7 @@ export function createParsedAstNodes(
}
export function compileCandidates(
rawCandidates: string[],
rawCandidates: Iterable<string>,
designSystem: DesignSystem,
{
parsedVariants = createParsedVariants(designSystem),

View file

@ -212,7 +212,7 @@ export function compile(
if (tailwindUtilitiesNode) {
let previousAstNodeCount = parsedAstNodes.size
let newNodes = compileCandidates(Array.from(allCandidates), designSystem, {
let newNodes = compileCandidates(allCandidates, designSystem, {
parsedVariants,
parsedCandidates,
parsedAstNodes,