Home / Function/ inferDataType() — tailwindcss Function Reference

inferDataType() — tailwindcss Function Reference

Architecture documentation for the inferDataType() function in infer-data-type.ts from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  6f422594_e782_07e7_7b41_29a3f93e32b9["inferDataType()"]
  43fe4735_10e8_ed1d_6f4f_74b2008c1b00["infer-data-type.ts"]
  6f422594_e782_07e7_7b41_29a3f93e32b9 -->|defined in| 43fe4735_10e8_ed1d_6f4f_74b2008c1b00
  31653e23_464a_3652_4a48_0c82332a92c4["buildPluginApi()"]
  31653e23_464a_3652_4a48_0c82332a92c4 -->|calls| 6f422594_e782_07e7_7b41_29a3f93e32b9
  b1961b55_1394_8973_5694_152fd6b3140a["resolveValueFunction()"]
  b1961b55_1394_8973_5694_152fd6b3140a -->|calls| 6f422594_e782_07e7_7b41_29a3f93e32b9
  style 6f422594_e782_07e7_7b41_29a3f93e32b9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/tailwindcss/src/utils/infer-data-type.ts lines 47–57

export function inferDataType(value: string, types: DataType[]): DataType | null {
  if (value.startsWith('var(')) return null

  for (let type of types) {
    if (checks[type]?.(value)) {
      return type
    }
  }

  return null
}

Domain

Subdomains

Frequently Asked Questions

What does inferDataType() do?
inferDataType() is a function in the tailwindcss codebase, defined in packages/tailwindcss/src/utils/infer-data-type.ts.
Where is inferDataType() defined?
inferDataType() is defined in packages/tailwindcss/src/utils/infer-data-type.ts at line 47.
What calls inferDataType()?
inferDataType() is called by 2 function(s): buildPluginApi, resolveValueFunction.

Analyze Your Own Codebase

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

Try Supermodel Free