walk-variants.ts — tailwindcss Source File
Architecture documentation for walk-variants.ts, a typescript file in the tailwindcss codebase. 3 imports, 2 dependents.
Entity Profile
Dependency Diagram
graph LR 9ff6caab_a6b5_8ba2_418e_e53a6c69b3cb["walk-variants.ts"] ba6fca27_7720_5839_0f92_bc2abb8db636["candidate.ts"] 9ff6caab_a6b5_8ba2_418e_e53a6c69b3cb --> ba6fca27_7720_5839_0f92_bc2abb8db636 8bd9cfb2_c46c_c5ca_1a1d_80c33f160f3c["Candidate"] 9ff6caab_a6b5_8ba2_418e_e53a6c69b3cb --> 8bd9cfb2_c46c_c5ca_1a1d_80c33f160f3c f07aee52_6e2e_eded_3538_e058170e7381["Variant"] 9ff6caab_a6b5_8ba2_418e_e53a6c69b3cb --> f07aee52_6e2e_eded_3538_e058170e7381 fd9821c7_1a1a_545c_2d82_048fc3c3d870["migrate-arbitrary-variants.ts"] fd9821c7_1a1a_545c_2d82_048fc3c3d870 --> 9ff6caab_a6b5_8ba2_418e_e53a6c69b3cb 5d3b10aa_da00_02c8_3f52_47b3ae3aa06e["migrate-modernize-arbitrary-values.ts"] 5d3b10aa_da00_02c8_3f52_47b3ae3aa06e --> 9ff6caab_a6b5_8ba2_418e_e53a6c69b3cb style 9ff6caab_a6b5_8ba2_418e_e53a6c69b3cb fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import type { Candidate, Variant } from '../../../tailwindcss/src/candidate'
export function* walkVariants(candidate: Candidate) {
function* inner(
variant: Variant,
parent: Extract<Variant, { kind: 'compound' }> | null = null,
): Iterable<[Variant, Extract<Variant, { kind: 'compound' }> | null]> {
yield [variant, parent]
if (variant.kind === 'compound') {
yield* inner(variant.variant, variant)
}
}
for (let variant of candidate.variants) {
yield* inner(variant, null)
}
}
Domain
Subdomains
Functions
Dependencies
Imported By
Source
Frequently Asked Questions
What does walk-variants.ts do?
walk-variants.ts is a source file in the tailwindcss codebase, written in typescript. It belongs to the CommandLineInterface domain, Renderer subdomain.
What functions are defined in walk-variants.ts?
walk-variants.ts defines 1 function(s): walkVariants.
What does walk-variants.ts depend on?
walk-variants.ts imports 3 module(s): Candidate, Variant, candidate.ts.
What files import walk-variants.ts?
walk-variants.ts is imported by 2 file(s): migrate-arbitrary-variants.ts, migrate-modernize-arbitrary-values.ts.
Where is walk-variants.ts in the architecture?
walk-variants.ts is located at packages/@tailwindcss-upgrade/src/utils/walk-variants.ts (domain: CommandLineInterface, subdomain: Renderer, directory: packages/@tailwindcss-upgrade/src/utils).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free