success call entity method

This commit is contained in:
pengfei.zhou
2019-07-18 18:44:16 +08:00
parent 723c5455ab
commit 344ba18df8
5 changed files with 12 additions and 10 deletions

View File

@@ -1,12 +1,13 @@
import { View } from "./view";
import { } from '../runtime/global'
export function Registor<T extends { new(...args: any[]): {} }>(constructor: T) {
const ret = class extends constructor {
context = context
export function Registor(context: any) {
return <T extends { new(...args: any[]): {} }>(constructor: T) => {
const ret = class extends constructor {
context = context
}
context.register(new ret)
return ret
}
context.register(new ret)
return ret
}