wip: warning

This commit is contained in:
Evan You 2018-10-03 13:03:20 -04:00
parent 88be7ecd37
commit d893046830

View File

@ -0,0 +1,20 @@
import { MountedComponent, ComponentType } from './component'
let currentComponent: MountedComponent | null = null
let currentComponentDefinition: ComponentType | null = null
export function setCurrentComponent(c: MountedComponent) {
currentComponent = c
}
export function unsetCurrentComponent() {
currentComponent = null
}
export function setCurrentComponentDefinition(d: ComponentType) {
currentComponentDefinition = d
}
export function unsetCurrentComponentDefinition() {
currentComponentDefinition = null
}