types: trim exports
This commit is contained in:
@@ -3,12 +3,12 @@ import { createComponentVNode, Slots } from '../vdom'
|
||||
import { Component, ComponentType, ComponentClass } from '../component'
|
||||
import { unwrap } from '@vue/observer'
|
||||
|
||||
export interface AsyncComponentFactory {
|
||||
interface AsyncComponentFactory {
|
||||
(): Promise<ComponentType>
|
||||
resolved?: ComponentType
|
||||
}
|
||||
|
||||
export interface AsyncComponentFullOptions {
|
||||
interface AsyncComponentFullOptions {
|
||||
factory: AsyncComponentFactory
|
||||
loading?: ComponentType
|
||||
error?: ComponentType
|
||||
@@ -16,9 +16,7 @@ export interface AsyncComponentFullOptions {
|
||||
timeout?: number
|
||||
}
|
||||
|
||||
export type AsyncComponentOptions =
|
||||
| AsyncComponentFactory
|
||||
| AsyncComponentFullOptions
|
||||
type AsyncComponentOptions = AsyncComponentFactory | AsyncComponentFullOptions
|
||||
|
||||
interface AsyncContainerData {
|
||||
comp: ComponentType | null
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { observable } from '@vue/observer'
|
||||
import { Component } from '../component'
|
||||
import { Slots } from '../vdom'
|
||||
|
||||
const contextStore = observable() as Record<string | symbol, any>
|
||||
|
||||
@@ -39,7 +38,7 @@ export class Provide extends Component<{}, ProviderProps> {
|
||||
beforeUpdate() {
|
||||
this.updateValue()
|
||||
}
|
||||
render(props: ProviderProps, slots: Slots) {
|
||||
render(props: any, slots: any) {
|
||||
return slots.default && slots.default()
|
||||
}
|
||||
}
|
||||
@@ -57,7 +56,7 @@ Provide.options = {
|
||||
}
|
||||
|
||||
export class Inject extends Component {
|
||||
render(props: any, slots: Slots) {
|
||||
render(props: any, slots: any) {
|
||||
return slots.default && slots.default(contextStore[props.id])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { VNode } from '../vdom'
|
||||
import { MountedComponent } from '../component'
|
||||
|
||||
export interface DirectiveBinding {
|
||||
interface DirectiveBinding {
|
||||
instance: MountedComponent
|
||||
value?: any
|
||||
oldValue?: any
|
||||
@@ -9,14 +9,14 @@ export interface DirectiveBinding {
|
||||
modifiers?: DirectiveModifiers
|
||||
}
|
||||
|
||||
export type DirectiveHook = (
|
||||
type DirectiveHook = (
|
||||
el: any,
|
||||
binding: DirectiveBinding,
|
||||
vnode: VNode,
|
||||
prevVNode: VNode | void
|
||||
) => void
|
||||
|
||||
export interface Directive {
|
||||
interface Directive {
|
||||
beforeMount: DirectiveHook
|
||||
mounted: DirectiveHook
|
||||
beforeUpdate: DirectiveHook
|
||||
@@ -25,7 +25,7 @@ export interface Directive {
|
||||
unmounted: DirectiveHook
|
||||
}
|
||||
|
||||
export type DirectiveModifiers = Record<string, boolean>
|
||||
type DirectiveModifiers = Record<string, boolean>
|
||||
|
||||
const valueCache = new WeakMap<Directive, WeakMap<any, any>>()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user