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 VueCore VDom 1 imports 2 dependents 1 functions

Entity Profile

Dependency Diagram

graph LR
  568fc8c2_8a29_0e8e_a20a_4478e7270dd9["index.ts"]
  90a2398a_1498_3263_c62e_0c064dd2c9b3["index"]
  568fc8c2_8a29_0e8e_a20a_4478e7270dd9 --> 90a2398a_1498_3263_c62e_0c064dd2c9b3
  c617a26f_747b_ad91_805e_3599015c7466["options.ts"]
  c617a26f_747b_ad91_805e_3599015c7466 --> 568fc8c2_8a29_0e8e_a20a_4478e7270dd9
  04498845_3cc1_e86f_9070_0c7b23b88f7c["runtime-with-compiler.ts"]
  04498845_3cc1_e86f_9070_0c7b23b88f7c --> 568fc8c2_8a29_0e8e_a20a_4478e7270dd9
  style 568fc8c2_8a29_0e8e_a20a_4478e7270dd9 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 VueCore domain, VDom 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: VueCore, subdomain: VDom, 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