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
Evan You
e67f655b26
refactor(runtime-core): revert setup() result reactive conversion
...
BREAKING CHANGE: revert setup() result reactive conversion
Revert 6b10f0c
& a840e7d
. The motivation of the original change was
avoiding unnecessary deep conversions, but that can be achieved by
explicitly marking values non-reactive via `markNonReactive`.
Removing the reactive conversion behavior leads to an usability
issue in that plain objects containing refs (which is what most
composition functions will return), when exposed as a nested
property from `setup()`, will not unwrap the refs in templates. This
goes against the "no .value in template" intuition and the only
workaround requires users to manually wrap it again with `reactive()`.
So in this commit we are reverting to the previous behavior where
objects returned from `setup()` are implicitly wrapped with
`reactive()` for deep ref unwrapping.
2020-02-26 19:01:42 -05: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
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