Commit Graph

101 Commits

Author SHA1 Message Date
wonderl17
735ada1507
fix(runtime-core): add useAttrs and useSlots export (#4053) 2021-07-02 07:51:09 -04:00
Evan You
127ed1b969 fix(types): improve type of unref()
fix #3954
2021-07-01 15:20:49 -04:00
Evan You
f680074468 chore: fix dts test 2021-06-26 21:35:00 -04:00
Evan You
4c5844a9ca feat(sfc): withDefaults helper 2021-06-26 21:11:57 -04:00
Evan You
3ffc7be864 chore(sfc-playground): ignore duplicate logs 2021-06-25 19:31:47 -04:00
Eduardo San Martin Morote
a137da8a9f
feat(sfc): add defineEmits and deprecate defineEmit (#3725) 2021-06-22 15:02:56 -04:00
Carlos Rodrigues
92e7330385
types(props): Support undefined as default (#3783) 2021-05-17 14:04:31 -04:00
GU Yiling
9b160b9405
fix(types): declared prop keys should always exist in props argument (#3726) 2021-05-12 17:47:31 -04:00
HcySunYang
5db2b141dc
fix(types): add a type-only differentiator to assist Mixin's type infer (#3481)
fix #3468
2021-03-29 18:07:36 -04:00
Kael
4f26835dac
fix(types/tsx): make JSX.Element extend VNode (#3171) 2021-03-29 17:38:25 -04:00
Evan You
bb8cdcad9f fix(compiler-sfc): support proper type arguments for defineEmit helper
fix #2874
2021-03-29 16:38:07 -04:00
HcySunYang
2b588cf1bc
fix(types): unwrap refs on public instance data (#3319)
fix #3315
2021-03-25 17:30:10 -04:00
07akioni
3755e60c52
fix(types): union function prop (#3119)
fix #3357
2021-03-25 11:27:54 -04:00
Evan You
3f9906a2f8 test(types): test for tsx style validation 2021-03-01 12:31:40 -05:00
HcySunYang
4a965802e8
types: support object as props type (#3165) 2021-02-24 16:20:41 -05:00
HcySunYang
48f0d2944f
fix(types): extract the correct props type for the DateConstructor (#2676) 2021-02-05 19:56:23 +01:00
07akioni
4ca4666d58
fix(toRef): ref created from union typed prop can't be used in watch (#3048) 2021-02-03 19:12:51 +01:00
Zcating
d2d27b2e66
types(watch): better typing when watching multiple sources (#2425) 2020-12-04 16:32:26 -05:00
Carlos Rodrigues
6684c6334d
types: mixin and extends typing on data and setup (#2404)
close #2350
2020-12-04 16:06:34 -05:00
Evan You
e315d84936 fix(types): fix ToRefs type on union value types
fix #2687
2020-12-02 14:58:03 -05:00
Evan You
47d73c23e1 wip: defineOptions -> defineProps + defineEmit + useContext 2020-11-24 19:04:21 -05:00
Evan You
1ff5960971 wip: useOptions -> defineOptions 2020-11-13 17:38:28 -05:00
Evan You
91d990d45a chore: ignore template-explorer in dts tests 2020-11-13 00:14:52 -05:00
Evan You
6fc8d5d0ba wip: type inference for useOptions 2020-11-13 00:01:44 -05:00
Evan You
8e20375372 fix(types): ensure correct type for toRef and toRefs on existing refs 2020-10-27 18:50:34 -04:00
Carlos Rodrigues
1f2a652a9d
fix(types): h support for resolveComponent (#2402)
close #2357
2020-10-20 15:56:29 -04:00
Carlos Rodrigues
d9ad45ad6c
types(defineComponent): fix optional Boolean prop types (#2401)
fix #2338
2020-10-19 17:25:55 -04:00
wonderful-panda
5dbd6b36a0
fix(types): fix using tuple type as EmitsOptions (#2160)
fix #2159
2020-09-22 10:05:37 -04:00
Anthony Fu
57bdaa2220
fix(types): component instance inference without props (#2145) 2020-09-18 00:13:47 -04:00
wonderful-panda
89e9ab8a2a
fix(types/tsx): optional props from Mixin/Extends are treated as required (#2048) 2020-09-16 10:09:35 -04:00
Cédric Exbrayat
7e68ddd354
chore: typos in suspense events (#2131)
Removes the mention of the recede event that has been replaced.
2020-09-16 09:30:47 -04:00
Carlos Rodrigues
be27bbc5ad
types(defineComponent): fix missing exported types (#2124) 2020-09-16 09:29:42 -04:00
Evan You
5ae7380b4a
feat: update Suspense usage (#2099)
See https://github.com/vuejs/vue-next/pull/2099 for details.
2020-09-15 12:45:06 -04:00
Carlos Rodrigues
4fd468aced
types(runtime-core): refactor defineComponent (#1883) 2020-09-15 11:46:11 -04:00
Evan You
b2dc95378d types: fix + test inject API typing
ref: #2052
2020-09-14 21:26:28 -04:00
HcySunYang
24fcf6ae7c
fix(types): properly infer return type from async setup (#2051)
fix #2049
2020-09-14 11:28:56 -04:00
Katashin
67b6e0f894
fix(types): relax ComponentPublicInstanceConstructor type for class components (#1943) 2020-08-24 21:53:30 -04:00
HcySunYang
955450f539
types(runtime-core): improve the extracted instance types (#1936) 2020-08-24 21:37:22 -04:00
Carlos Rodrigues
c2913d57d1
fix(types): handling PropType<Function> with default value (#1896)
fix #1891
2020-08-19 16:36:42 -04:00
Evan You
eb2ae44d94 refactor(types): widen Component type to include consutructor types
returned from `defineComponent`

ref: https://github.com/vuejs/vue-router-next/pull/421
also close #1880

Previous `Component` type is now exported as `ConcreteComponent`.

This introduces a minor breaking change when calling `h(comp, { ... })`
will now fail if `comp` is a of generic `Component` type, since it does
not specify what props it expects.
2020-08-19 16:19:25 -04:00
Carlos Rodrigues
4baf852a34
types(runtime-core): make FunctionalComponent with emit string[] to be Component (#1879)
fix #1847
2020-08-19 10:00:48 -04:00
Carlos Rodrigues
c86e7ad11b
types(reactivity): improve typings for shallowRef (#1780) 2020-08-18 23:34:29 -04:00
Evan You
9f92871c80 types(runtime-core): argument for props validator
Unfortunately it requires explicit annotation for now
2020-08-18 11:37:34 -04:00
Aurelius333
a88895b5da
types(runtime-core): make this void in prop validators and prop default factories (#1867) 2020-08-18 11:25:55 -04:00
HcySunYang
9d36c61796
types(runtime-core): improve PropType inference precision (#1863) 2020-08-18 11:23:18 -04:00
Herrington Darkholme
6f8bac5fca
test(types): add prop validator test (#1769)
Due to the limitation of TS, prop validator must be fully annotated
refer to https://github.com/microsoft/TypeScript/issues/38623
2020-08-14 17:40:41 -04:00
Pick
44448fdd22
types(reactivity): add dts for proxyRefs & improve typings (#1786) 2020-08-14 17:37:36 -04:00
Aurelius333
5002ab53d6
types(runtime-core): make this void in emits validator (#1842) 2020-08-14 17:36:26 -04:00
Evan You
aa06b1034d
feat(reactivity): proxyRefs method and ShallowUnwrapRefs type (#1682)
* feat(reactivity): `proxyRefs` method and `ShallowUnwrapRefs` type

BREAKING CHANGE: template auto ref unwrapping are now applied shallowly,
i.e. only at the root level. See https://github.com/vuejs/vue-next/pull/1682 for
more details.
2020-07-28 16:30:56 -04:00
Carlos Rodrigues
421a70de5e
test(types): test computed get/set type inference (#1709) 2020-07-28 15:40:23 -04:00