Home / File/ index.ts — vue Source File

index.ts — vue Source File

Architecture documentation for index.ts, a typescript file in the vue codebase. 1 imports, 2 dependents.

File typescript WebPlatform WebCompiler 1 imports 2 dependents 1 functions

Entity Profile

Dependency Diagram

graph LR
  fca02fea_d74a_16b5_3202_1a85f2351c93["index.ts"]
  02e43f4a_da65_7acd_5a98_0f017554a159["index"]
  fca02fea_d74a_16b5_3202_1a85f2351c93 --> 02e43f4a_da65_7acd_5a98_0f017554a159
  79e91077_f7a7_0ee1_926a_dbf257c88c51["options.ts"]
  79e91077_f7a7_0ee1_926a_dbf257c88c51 --> fca02fea_d74a_16b5_3202_1a85f2351c93
  65cd287e_4e6a_7361_27b7_9f8be7ceff8e["runtime-with-compiler.ts"]
  65cd287e_4e6a_7361_27b7_9f8be7ceff8e --> fca02fea_d74a_16b5_3202_1a85f2351c93
  style fca02fea_d74a_16b5_3202_1a85f2351c93 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { warn } from 'core/util/index'

export * from './attrs'
export * from './class'
export * from './element'

/**
 * Query an element selector if it's not an element already.
 */
export function query(el: string | Element): Element {
  if (typeof el === 'string') {
    const selected = document.querySelector(el)
    if (!selected) {
      __DEV__ && warn('Cannot find element: ' + el)
      return document.createElement('div')
    }
    return selected
  } else {
    return el
  }
}

Domain

Subdomains

Functions

Dependencies

  • index

Frequently Asked Questions

What does index.ts do?
index.ts is a source file in the vue codebase, written in typescript. It belongs to the WebPlatform domain, WebCompiler subdomain.
What functions are defined in index.ts?
index.ts defines 1 function(s): query.
What does index.ts depend on?
index.ts imports 1 module(s): index.
What files import index.ts?
index.ts is imported by 2 file(s): options.ts, runtime-with-compiler.ts.
Where is index.ts in the architecture?
index.ts is located at src/platforms/web/util/index.ts (domain: WebPlatform, subdomain: WebCompiler, directory: src/platforms/web/util).

Analyze Your Own Codebase

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

Try Supermodel Free