Skip to content

Update typings #3876

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 8, 2016
Merged

Update typings #3876

merged 2 commits into from
Oct 8, 2016

Conversation

ktsn
Copy link
Member

@ktsn ktsn commented Oct 8, 2016

Update methods option type

Apply this type in the functions of methods option like lifecycle hooks. (Function is alias of (...args: any[]) => any)
We can omit this type annotation for methods option due to this update (See options-test.ts).

Improve $createElement type and expose it

  1. Allow to create empty vnode (h()).
  2. Allow to pass vnode children to 2nd argument.

Also, this patch enable us to use the type of $createElement. It would be useful when we annotate render option type manually.

import { CreateElement } from 'vue'

export default {
  render (h: CreateElement) {
    // ...
  }
}

@kaorun343
Copy link
Contributor

LGTM.

@yyx990803 yyx990803 merged commit 6643cb8 into vuejs:dev Oct 8, 2016
@ktsn ktsn deleted the update-typings branch October 9, 2016 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants