Home / File/ async-component-test.ts — vue Source File

async-component-test.ts — vue Source File

Architecture documentation for async-component-test.ts, a typescript file in the vue codebase. 1 imports, 0 dependents.

File typescript CompilerSFC ScriptAnalyzer 1 imports 5 functions

Entity Profile

Dependency Diagram

graph LR
  e129b71b_19d3_c204_decd_1e36c282457c["async-component-test.ts"]
  09422b63_6947_479f_f3b8_a48790187388["./index"]
  e129b71b_19d3_c204_decd_1e36c282457c --> 09422b63_6947_479f_f3b8_a48790187388
  style e129b71b_19d3_c204_decd_1e36c282457c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import Vue, { AsyncComponent, Component } from '../index'

const a: AsyncComponent = () => ({
  component: new Promise<Component>((res, rej) => {
    res({ template: '' })
  })
})

const b: AsyncComponent = () => ({
  // @ts-expect-error component has to be a Promise that resolves to a component
  component: () =>
    new Promise<Component>((res, rej) => {
      res({ template: '' })
    })
})

const c: AsyncComponent = () =>
  new Promise<Component>((res, rej) => {
    res({
      template: ''
    })
  })

const d: AsyncComponent = () =>
  new Promise<{ default: Component }>((res, rej) => {
    res({
      default: {
        template: ''
      }
    })
  })

const e: AsyncComponent = () => ({
  component: new Promise<{ default: Component }>((res, rej) => {
    res({
      default: {
        template: ''
      }
    })
  })
})

// Test that Vue.component accepts any AsyncComponent
Vue.component('async-component1', a)

Domain

Subdomains

Functions

Dependencies

  • ./index

Frequently Asked Questions

What does async-component-test.ts do?
async-component-test.ts is a source file in the vue codebase, written in typescript. It belongs to the CompilerSFC domain, ScriptAnalyzer subdomain.
What functions are defined in async-component-test.ts?
async-component-test.ts defines 5 function(s): a, b, c, d, e.
What does async-component-test.ts depend on?
async-component-test.ts imports 1 module(s): ./index.
Where is async-component-test.ts in the architecture?
async-component-test.ts is located at types/test/async-component-test.ts (domain: CompilerSFC, subdomain: ScriptAnalyzer, directory: types/test).

Analyze Your Own Codebase

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

Try Supermodel Free