Browse Source

fix type tests

dev
Evan You 8 years ago
parent
commit
deae1ff851
  1. 4
      types/options.d.ts
  2. 2
      types/test/options-test.ts
  3. 2
      types/test/vue-test.ts

4
types/options.d.ts

@ -57,10 +57,10 @@ export interface ComponentOptions<V extends Vue> {
}
export interface FunctionalComponentOptions {
name?: string;
props?: string[] | { [key: string]: PropOptions | Constructor | Constructor[] };
functional: boolean;
render(this: never, createElement: CreateElement, context: RenderContext): VNode;
name?: string;
render(this: never, createElement: CreateElement, context: RenderContext): VNode | void;
}
export interface RenderContext {

2
types/test/options-test.ts

@ -92,7 +92,7 @@ Vue.component('component', {
createElement("div", "message"),
createElement(Vue.component("component")),
createElement({} as ComponentOptions<Vue>),
createElement({ functional: true }),
createElement({ functional: true, render () {}}),
createElement(() => Vue.component("component")),
createElement(() => ( {} as ComponentOptions<Vue> )),

2
types/test/vue-test.ts

@ -83,7 +83,7 @@ class Test extends Vue {
this.directive("", {bind() {}});
this.filter("", (value: number) => value);
this.component("", { data: () => ({}) });
this.component("", { functional: true });
this.component("", { functional: true, render () {}});
this.use;
this.mixin(Test);
this.compile("<div>{{ message }}</div>");

Loading…
Cancel
Save