Home / Function/ walk() — tailwindcss Function Reference

walk() — tailwindcss Function Reference

Architecture documentation for the walk() function in walk.ts from the tailwindcss codebase.

Function typescript Oxide PreProcessors calls 1 called by 40

Entity Profile

Dependency Diagram

graph TD
  4982d9ce_98d4_85d9_44af_7cc47b93c482["walk()"]
  1b8f1c54_b1e9_e18d_0719_b7ad92808185["walk.ts"]
  4982d9ce_98d4_85d9_44af_7cc47b93c482 -->|defined in| 1b8f1c54_b1e9_e18d_0719_b7ad92808185
  7ac5591b_df87_a0ae_2005_4d18e64a288f["rewriteUrls()"]
  7ac5591b_df87_a0ae_2005_4d18e64a288f -->|calls| 4982d9ce_98d4_85d9_44af_7cc47b93c482
  45e706aa_1a3f_8bf4_b828_65bf65ab488e["isAutomaticVarInjectionException()"]
  45e706aa_1a3f_8bf4_b828_65bf65ab488e -->|calls| 4982d9ce_98d4_85d9_44af_7cc47b93c482
  0839b6fe_9be4_b1fe_f6ef_c1d5509a29c1["getAppliedNodeStack()"]
  0839b6fe_9be4_b1fe_f6ef_c1d5509a29c1 -->|calls| 4982d9ce_98d4_85d9_44af_7cc47b93c482
  7ad9d996_c0ff_47f5_d131_ab2ead06506e["substituteAtApply()"]
  7ad9d996_c0ff_47f5_d131_ab2ead06506e -->|calls| 4982d9ce_98d4_85d9_44af_7cc47b93c482
  9f2a64dc_05ff_3425_1af8_f2dbd33c3b9a["optimizeAst()"]
  9f2a64dc_05ff_3425_1af8_f2dbd33c3b9a -->|calls| 4982d9ce_98d4_85d9_44af_7cc47b93c482
  259dde3d_da3e_b1d0_30ff_85ba2a6327f2["findNode()"]
  259dde3d_da3e_b1d0_30ff_85ba2a6327f2 -->|calls| 4982d9ce_98d4_85d9_44af_7cc47b93c482
  2d1ddb63_f29d_b245_22dc_8060d98def4c["substituteAtImports()"]
  2d1ddb63_f29d_b245_22dc_8060d98def4c -->|calls| 4982d9ce_98d4_85d9_44af_7cc47b93c482
  fa7106d0_b629_ab06_9635_b04e9e0c20f0["printArbitraryValueCache()"]
  fa7106d0_b629_ab06_9635_b04e9e0c20f0 -->|calls| 4982d9ce_98d4_85d9_44af_7cc47b93c482
  31653e23_464a_3652_4a48_0c82332a92c4["buildPluginApi()"]
  31653e23_464a_3652_4a48_0c82332a92c4 -->|calls| 4982d9ce_98d4_85d9_44af_7cc47b93c482
  bc71102c_3f3f_0a7f_c5dc_2ea1f291aec2["replaceNestedClassNameReferences()"]
  bc71102c_3f3f_0a7f_c5dc_2ea1f291aec2 -->|calls| 4982d9ce_98d4_85d9_44af_7cc47b93c482
  74e35fd7_c887_0191_82e9_5c47ae4932d3["applyVariant()"]
  74e35fd7_c887_0191_82e9_5c47ae4932d3 -->|calls| 4982d9ce_98d4_85d9_44af_7cc47b93c482
  f875e425_9644_1071_3601_45e7c7f789d3["constantFoldDeclaration()"]
  f875e425_9644_1071_3601_45e7c7f789d3 -->|calls| 4982d9ce_98d4_85d9_44af_7cc47b93c482
  6bed2e43_7855_2758_8396_9f9e9a11be52["substituteFunctions()"]
  6bed2e43_7855_2758_8396_9f9e9a11be52 -->|calls| 4982d9ce_98d4_85d9_44af_7cc47b93c482
  style 4982d9ce_98d4_85d9_44af_7cc47b93c482 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/tailwindcss/src/walk.ts lines 42–53

export function walk<T extends object>(
  ast: T[],
  hooks:
    | ((node: T, ctx: VisitContext<T>) => EnterResult<T> | void) // Old API, enter only
    | {
        enter?: (node: T, ctx: VisitContext<T>) => EnterResult<T> | void
        exit?: (node: T, ctx: VisitContext<T>) => ExitResult<T> | void
      },
): void {
  if (typeof hooks === 'function') walkImplementation(ast, hooks)
  else walkImplementation(ast, hooks.enter, hooks.exit)
}

Domain

Subdomains

Frequently Asked Questions

What does walk() do?
walk() is a function in the tailwindcss codebase, defined in packages/tailwindcss/src/walk.ts.
Where is walk() defined?
walk() is defined in packages/tailwindcss/src/walk.ts at line 42.
What does walk() call?
walk() calls 1 function(s): walkImplementation.
What calls walk()?
walk() is called by 40 function(s): allVariablesAreUsed, applyCompatibilityHooks, applyVariant, buildDesignSystem, buildPluginApi, canonicalizeAst, compileAst, constantFoldDeclaration, and 32 more.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free