Commit Graph

17 Commits

Author SHA1 Message Date
Evan You
627b9df4a2 fix(types): improve ref typing, close #759 2020-02-21 17:45:42 +01:00
Evan You
a840e7ddf0 fix(types): update setup binding unwrap types for 6b10f0c
close #738
2020-02-19 18:29:18 +01:00
Evan You
cb03362b08 chore: fix dts tests 2020-02-17 23:26:25 -05:00
Evan You
9571ede84b refactor(watch): adjsut watch API behavior
BREAKING CHANGE: `watch` behavior has been adjusted.

    - When using the `watch(source, callback, options?)` signature, the
      callback now fires lazily by default (consistent with 2.x
      behavior).

      Note that the `watch(effect, options?)` signature is still eager,
      since it must invoke the `effect` immediately to collect
      dependencies.

    - The `lazy` option has been replaced by the opposite `immediate`
      option, which defaults to `false`. (It's ignored when using the
      effect signature)

    - Due to the above changes, the `watch` option in Options API now
      behaves exactly the same as 2.x.

    - When using the effect signature or `{ immediate: true }`, the
      intital execution is now performed synchronously instead of
      deferred until the component is mounted. This is necessary for
      certain use cases to work properly with `async setup()` and
      Suspense.

      The side effect of this is the immediate watcher invocation will
      no longer have access to the mounted DOM. However, the watcher can
      be initiated inside `onMounted` to retain previous behavior.
2020-02-17 23:16:58 -05:00
Evan You
77103e1fd7 types: fix tsx dts tests 2020-02-15 21:48:45 -05:00
Evan You
c6a9787941 fix(types): ensure correct oldValue typing based on lazy option
close #719
2020-02-13 12:09:13 -05:00
Evan You
8c892e0392 test: fix dts tests for 1ccecc0 2020-01-27 16:00:17 -05:00
IU
2b4d0d6501 types(reactivity): handle primitive + object intersection types in UnwrapRef (#614) 2020-01-16 17:47:47 -05:00
Cédric Exbrayat
2f6ec45d10 test: reformat defineComponent dts test (#631) 2020-01-16 17:46:25 -05:00
Cédric Exbrayat
74baea108a fix(types): components options should accept components defined with defineComponent (#602) 2020-01-13 17:12:45 -05:00
Evan You
7df5e70c83 types: accept defineComponent return types in app.mount 2019-12-24 11:04:44 -05:00
Chris Fritz
1c4cdd841d refactor(createComponent): rename to defineComponent (#549) 2019-12-22 10:58:12 -05:00
Evan You
24b4120c21 types: fix dts 2019-11-22 18:09:26 -05:00
Evan You
08bf9976ae types: ensure props are readonly 2019-11-09 18:40:25 -05:00
Evan You
a5f962ab8e test(types): assert props are readonly 2019-11-09 10:03:58 -05:00
Evan You
dfc7c0f12a refactor: adjust internal vnode types + more dts tests 2019-11-04 18:38:55 -05:00
Evan You
66ecd8b47f types: setup tests for built d.ts files 2019-11-01 22:54:01 -04:00