feat: asset resolution

This commit is contained in:
Evan You
2019-09-02 16:43:26 -04:00
parent 67fd5b6091
commit 015d5dd0f1
5 changed files with 61 additions and 21 deletions

View File

@@ -22,6 +22,7 @@ import {
} from './component'
import { callWithAsyncErrorHandling, ErrorTypes } from './errorHandling'
import { HostNode } from './createRenderer'
import { resolveAsset } from './apiCreateApp'
export interface DirectiveBinding {
instance: ComponentRenderProxy | null
@@ -119,11 +120,6 @@ export function applyDirectives(
return vnode
}
export function resolveDirective(name: string): Directive {
// TODO
return {} as any
}
export function invokeDirectiveHook(
hook: Function | Function[],
instance: ComponentInstance | null,
@@ -144,3 +140,7 @@ export function invokeDirectiveHook(
callWithAsyncErrorHandling(hook, instance, ErrorTypes.DIRECTIVE_HOOK, args)
}
}
export function resolveDirective(name: string): Directive | undefined {
return resolveAsset('directives', name)
}