currentInstance.ts — vue Source File
Architecture documentation for currentInstance.ts, a typescript file in the vue codebase. 1 imports, 9 dependents.
Entity Profile
Dependency Diagram
graph LR 08d717e5_b9dd_701c_e7a2_51d83681d28a["currentInstance.ts"] 907f4994_ea28_43b1_7976_0db9f0e97637["component"] 08d717e5_b9dd_701c_e7a2_51d83681d28a --> 907f4994_ea28_43b1_7976_0db9f0e97637 43edafdf_a4b3_d737_84e5_b3a7f3bd233b["apiInject.ts"] 43edafdf_a4b3_d737_84e5_b3a7f3bd233b --> 08d717e5_b9dd_701c_e7a2_51d83681d28a 1dba970c_2182_6fa4_46b1_6faf85d0d083["apiLifecycle.ts"] 1dba970c_2182_6fa4_46b1_6faf85d0d083 --> 08d717e5_b9dd_701c_e7a2_51d83681d28a 4ad51b1f_61ec_31ba_dbb7_667d6a0a8c85["apiSetup.ts"] 4ad51b1f_61ec_31ba_dbb7_667d6a0a8c85 --> 08d717e5_b9dd_701c_e7a2_51d83681d28a 38aa88fe_678d_7728_4258_240bdb85b32b["apiWatch.ts"] 38aa88fe_678d_7728_4258_240bdb85b32b --> 08d717e5_b9dd_701c_e7a2_51d83681d28a 94977aac_ee04_6312_be22_a49cc335d2ce["h.ts"] 94977aac_ee04_6312_be22_a49cc335d2ce --> 08d717e5_b9dd_701c_e7a2_51d83681d28a 50bb6353_35b0_d08f_72d3_b5e73e75dfee["computed.ts"] 50bb6353_35b0_d08f_72d3_b5e73e75dfee --> 08d717e5_b9dd_701c_e7a2_51d83681d28a f67ee11d_fb58_12ca_57cf_731c59a1b595["effect.ts"] f67ee11d_fb58_12ca_57cf_731c59a1b595 --> 08d717e5_b9dd_701c_e7a2_51d83681d28a 9fcee175_ab8d_e74c_35e3_8e0384ff40a2["useCssModule.ts"] 9fcee175_ab8d_e74c_35e3_8e0384ff40a2 --> 08d717e5_b9dd_701c_e7a2_51d83681d28a 67a194e4_a410_0dbd_e240_af7947944cfb["useCssVars.ts"] 67a194e4_a410_0dbd_e240_af7947944cfb --> 08d717e5_b9dd_701c_e7a2_51d83681d28a style 08d717e5_b9dd_701c_e7a2_51d83681d28a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { Component } from 'types/component'
export let currentInstance: Component | null = null
/**
* This is exposed for compatibility with v3 (e.g. some functions in VueUse
* relies on it). Do not use this internally, just use `currentInstance`.
*
* @internal this function needs manual type declaration because it relies
* on previously manually authored types from Vue 2
*/
export function getCurrentInstance(): { proxy: Component } | null {
return currentInstance && { proxy: currentInstance }
}
/**
* @internal
*/
export function setCurrentInstance(vm: Component | null = null) {
if (!vm) currentInstance && currentInstance._scope.off()
currentInstance = vm
vm && vm._scope.on()
}
Domain
Subdomains
Functions
Dependencies
- component
Imported By
Source
Frequently Asked Questions
What does currentInstance.ts do?
currentInstance.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 currentInstance.ts?
currentInstance.ts defines 2 function(s): getCurrentInstance, setCurrentInstance.
What does currentInstance.ts depend on?
currentInstance.ts imports 1 module(s): component.
What files import currentInstance.ts?
currentInstance.ts is imported by 9 file(s): apiInject.ts, apiLifecycle.ts, apiSetup.ts, apiWatch.ts, computed.ts, effect.ts, h.ts, useCssModule.ts, and 1 more.
Where is currentInstance.ts in the architecture?
currentInstance.ts is located at src/v3/currentInstance.ts (domain: CompilerSFC, subdomain: ScriptAnalyzer, directory: src/v3).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free