Carlos Rodrigues
8dcb6c7bbd
fix(types): fix on* props incorrect type for TS 4.7 ( #6216 )
...
fix #6052
2022-07-06 04:28:25 -04:00
Evan You
ae1fd539b7
chore: fix dts test
2022-05-21 01:10:28 +08:00
Carlos Rodrigues
0c7fd13ea6
fix(types): fix typescript error when spreading $props
( #5968 )
2022-05-20 12:59:29 -04:00
Evan You
8071ef47b5
fix(types): restore DefineComponent argument order
...
This is necessary for compatibility w/ tsc-generated component types
using DefineComponent.
revert #5416
reopen #3796
fix #5967
2022-05-21 00:55:51 +08:00
Carlos Rodrigues
7c8f4578e9
fix(types): fix defineComponent
inference to Component
( #5949 )
2022-05-18 19:34:35 -04:00
Zclhlmgqzc
98b821d94a
fix(types): preserve and expose original options on defineComponent return type ( #5416 )
...
fix #3796
2022-05-06 05:44:05 -04:00
Evan You
4d07ed809c
test: remove module augmentation test which does not work in the setup
2022-01-16 17:13:52 +08:00
Evan You
78df8c78c4
fix(types/tsx): allow ref_for type on tsx elements
2022-01-16 15:54:58 +08:00
Evan You
77283f4c94
test(types): test ComponentCustomProps
2022-01-14 14:13:03 +08:00
cheng
3f5f98dcf5
chore(compiler-core): fix typo in defineComponent.test-d ( #4688 )
2021-09-27 11:12:13 +02:00
Amour1688
140f089917
fix(types): incorrect type inference of array ( #4578 )
2021-09-21 12:41:10 -04:00
fishDog
4178d5d7d9
fix(type): fix prop type infer ( #4530 )
...
fix #4525
2021-09-06 15:24:15 -04:00
Husam Ibrahim
4645a42b79
types(runtime-core): fix for multiple possible prop types including Date ( #4518 )
...
fix #4517
2021-09-05 18:16:44 -04:00
Carlos Rodrigues
afd49b3e88
types(PropType): Allow undefined
function to be used on PropType
( #4405 )
2021-08-23 19:04:03 -04:00
webfansplz
1ce34e25d5
fix(types): fix tsx emit-mapped handler return type ( #4290 )
...
fix #4288
2021-08-11 10:52:36 -04:00
Amour1688
d3d5ad204d
fix(types): remove explicit return type annotation requirement for this
inference in computed options ( #4221 )
2021-08-02 09:18:35 -04:00
Amour1688
69344ff1ae
feat(types): map declared emits to onXXX props in inferred prop types ( #3926 )
2021-07-19 18:22:19 -04:00
Carlos Rodrigues
18911abb91
fix(type): infer parent as this
on nextTick
function ( #3608 )
...
fix #3599
2021-07-15 16:28:20 -04:00
Carlos Rodrigues
92e7330385
types(props): Support undefined
as default ( #3783 )
2021-05-17 14:04: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
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
HcySunYang
48f0d2944f
fix(types): extract the correct props type for the DateConstructor ( #2676 )
2021-02-05 19:56:23 +01:00
Carlos Rodrigues
6684c6334d
types: mixin and extends typing on data and setup ( #2404 )
...
close #2350
2020-12-04 16:06:34 -05:00
Carlos Rodrigues
d9ad45ad6c
types(defineComponent): fix optional Boolean prop types ( #2401 )
...
fix #2338
2020-10-19 17:25:55 -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
Carlos Rodrigues
be27bbc5ad
types(defineComponent): fix missing exported types ( #2124 )
2020-09-16 09:29:42 -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
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
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
Carlos Rodrigues
5681fdb211
test(types): test dts for Options API method return type inference ( #1708 )
2020-07-28 15:31:23 -04:00
HcySunYang
5d8a64d53a
feat(types): deny unknown attributes on component by default ( #1614 )
...
close #1519
2020-07-17 11:43:28 -04:00
Guillaume Chau
568b6db12b
feat: Initial devtools support ( #1125 )
2020-07-16 18:18:52 -04:00
Carlos Rodrigues
d78a6821f5
types(runtime-core): default SetupContext
generic argument to EmitsOptions
( #1584 )
2020-07-15 09:19:20 -04:00
Carlos Rodrigues
1e90605c15
types(runtime-core): provide valid type for default $emit
( #1498 )
2020-07-08 11:51:03 -04:00
doly mood
d3c436ae2e
feat(types): mixins/extends support in TypeScript ( #626 )
2020-06-09 10:37:00 -04:00
Carlos Rodrigues
97dedebd80
feat(types): update to Typescript 3.9 ( #1106 )
2020-06-09 10:17:42 -04:00
Evan You
bf473a64ea
feat(runtime-core): type and attr fallthrough support for emits option
2020-04-03 12:05:52 -04:00
Evan You
c409d4f297
test(types): fix dts test
2020-04-03 10:51:17 -04:00
Evan You
0cf3f78134
test(types): also test Object as PropType casting
2020-04-03 09:29:21 -04:00
Carlos Rodrigues
026eb729f3
fix(types): allow use PropType with Function ( #915 )
...
close #748
2020-04-03 09:28:13 -04:00