wip: warning
This commit is contained in:
parent
88be7ecd37
commit
d893046830
20
packages/core/src/warning.ts
Normal file
20
packages/core/src/warning.ts
Normal 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
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user