Home / File/ typeUtils.ts — vite Source File

typeUtils.ts — vite Source File

Architecture documentation for typeUtils.ts, a typescript file in the vite codebase. 1 imports, 6 dependents.

File typescript ViteCore ConfigEngine 1 imports 6 dependents 1 functions

Entity Profile

Dependency Diagram

graph LR
  54e67a14_a437_c14e_bc06_6d4adc025099["typeUtils.ts"]
  693ca867_249b_3e5a_0ce1_8930413b7fcd["rolldown"]
  54e67a14_a437_c14e_bc06_6d4adc025099 --> 693ca867_249b_3e5a_0ce1_8930413b7fcd
  f81cffe5_5872_74d5_0c1b_79b0ef8844af["plugin.ts"]
  f81cffe5_5872_74d5_0c1b_79b0ef8844af --> 54e67a14_a437_c14e_bc06_6d4adc025099
  45981d85_cbdd_e969_8c88_c17072ea0eda["build.ts"]
  45981d85_cbdd_e969_8c88_c17072ea0eda --> 54e67a14_a437_c14e_bc06_6d4adc025099
  7da774f9_eca5_d54e_6e01_6bee7d460a2b["config.ts"]
  7da774f9_eca5_d54e_6e01_6bee7d460a2b --> 54e67a14_a437_c14e_bc06_6d4adc025099
  545df65b_7f67_94d3_e2e8_a592d5e64b8f["constants.ts"]
  545df65b_7f67_94d3_e2e8_a592d5e64b8f --> 54e67a14_a437_c14e_bc06_6d4adc025099
  e49f0ff7_5101_3a1d_5a1f_33fae58eea2d["preview.ts"]
  e49f0ff7_5101_3a1d_5a1f_33fae58eea2d --> 54e67a14_a437_c14e_bc06_6d4adc025099
  a423a1ed_f7d8_0eb5_9b8f_ddfa7fa8147e["index.ts"]
  a423a1ed_f7d8_0eb5_9b8f_ddfa7fa8147e --> 54e67a14_a437_c14e_bc06_6d4adc025099
  style 54e67a14_a437_c14e_bc06_6d4adc025099 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import type {
  ObjectHook,
  MinimalPluginContext as RolldownMinimalPluginContext,
  Plugin as RolldownPlugin,
} from 'rolldown'

export type NonNeverKeys<T> = {
  [K in keyof T]: T[K] extends never ? never : K
}[keyof T]

export type GetHookContextMap<Plugin> = {
  [K in keyof Plugin]-?: Plugin[K] extends ObjectHook<infer T, unknown>
    ? T extends (this: infer This, ...args: any[]) => any
      ? This extends RolldownMinimalPluginContext
        ? This
        : never
      : never
    : never
}

type RollupPluginHooksContext = GetHookContextMap<RolldownPlugin>
export type RollupPluginHooks = NonNeverKeys<RollupPluginHooksContext>

export type RequiredExceptFor<T, K extends keyof T> = Pick<T, K> &
  Required<Omit<T, K>>

Domain

Subdomains

Functions

Dependencies

  • rolldown

Frequently Asked Questions

What does typeUtils.ts do?
typeUtils.ts is a source file in the vite codebase, written in typescript. It belongs to the ViteCore domain, ConfigEngine subdomain.
What functions are defined in typeUtils.ts?
typeUtils.ts defines 1 function(s): args.
What does typeUtils.ts depend on?
typeUtils.ts imports 1 module(s): rolldown.
What files import typeUtils.ts?
typeUtils.ts is imported by 6 file(s): build.ts, config.ts, constants.ts, index.ts, plugin.ts, preview.ts.
Where is typeUtils.ts in the architecture?
typeUtils.ts is located at packages/vite/src/node/typeUtils.ts (domain: ViteCore, subdomain: ConfigEngine, directory: packages/vite/src/node).

Analyze Your Own Codebase

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

Try Supermodel Free