use.ts — vue Source File
Architecture documentation for use.ts, a typescript file in the vue codebase. 2 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR dc062a3a_6b69_b0c9_3501_30d73b720622["use.ts"] 2a298df2_21b8_7e5a_c372_51ba50c9d92d["index.ts"] dc062a3a_6b69_b0c9_3501_30d73b720622 --> 2a298df2_21b8_7e5a_c372_51ba50c9d92d 51931e9b_f9dc_de8e_3f55_263f1372f144["global-api"] dc062a3a_6b69_b0c9_3501_30d73b720622 --> 51931e9b_f9dc_de8e_3f55_263f1372f144 6090fc15_0543_136f_4e4a_ce1860382ce6["index.ts"] 6090fc15_0543_136f_4e4a_ce1860382ce6 --> dc062a3a_6b69_b0c9_3501_30d73b720622 style dc062a3a_6b69_b0c9_3501_30d73b720622 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import type { GlobalAPI } from 'types/global-api'
import { toArray, isFunction } from '../util/index'
export function initUse(Vue: GlobalAPI) {
Vue.use = function (plugin: Function | any) {
const installedPlugins =
this._installedPlugins || (this._installedPlugins = [])
if (installedPlugins.indexOf(plugin) > -1) {
return this
}
// additional parameters
const args = toArray(arguments, 1)
args.unshift(this)
if (isFunction(plugin.install)) {
plugin.install.apply(plugin, args)
} else if (isFunction(plugin)) {
plugin.apply(null, args)
}
installedPlugins.push(plugin)
return this
}
}
Domain
Subdomains
Functions
Dependencies
- global-api
- index.ts
Imported By
Source
Frequently Asked Questions
What does use.ts do?
use.ts is a source file in the vue codebase, written in typescript. It belongs to the CompilerSFC domain, TemplateTransformer subdomain.
What functions are defined in use.ts?
use.ts defines 1 function(s): initUse.
What does use.ts depend on?
use.ts imports 2 module(s): global-api, index.ts.
What files import use.ts?
use.ts is imported by 1 file(s): index.ts.
Where is use.ts in the architecture?
use.ts is located at src/core/global-api/use.ts (domain: CompilerSFC, subdomain: TemplateTransformer, directory: src/core/global-api).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free