refactor: expose $self

This commit is contained in:
Evan You
2019-03-01 13:47:28 -05:00
parent fa2240143c
commit 66686f38a7
4 changed files with 10 additions and 8 deletions

View File

@@ -30,6 +30,7 @@ export interface Component<P = {}, D = {}> extends PublicInstanceMethods {
readonly $options: ComponentOptions<P, D, this>
readonly $refs: Record<string | symbol, any>
readonly $proxy: this
readonly $self: this
}
interface PublicInstanceMethods {
@@ -99,10 +100,10 @@ export interface ComponentInstance<P = {}, D = {}>
$root: ComponentInstance
$children: ComponentInstance[]
$options: ComponentOptions<P, D>
$self: ComponentInstance<P, D> // on proxies only
_update: ReactiveEffect
_queueJob: ((fn: () => void) => void)
_self: ComponentInstance<P, D> // on proxies only
}
// actual implementation of the component