Commit Graph

74 Commits

Author SHA1 Message Date
yangxiuxiu 44973bb3e7
fix(types): strip non-prop default values from return type of withDefaults (#9998)
close #9899
2024-08-19 16:29:43 +08:00
Kevin Deng 三咲智子 928af5fe2f
refactor(types): enable `isolatedDeclarations` (#11178) 2024-08-08 23:05:21 +08:00
Evan You eaf5455d77
chore: Merge branch 'main' into minor 2024-08-07 18:25:58 +08:00
Tycho 4592b63c6a
fix(types/withDefaults): ensure default values of type `any` do not include `undefined` (#11490) 2024-08-05 10:59:44 +08:00
Evan You 26356264d2
chore: Merge branch 'main' into minor 2024-06-14 12:32:28 +02:00
Micha Huhn 70773d0098
docs: fix typo (#11105) 2024-06-11 14:19:52 +08:00
tomasvn 32262a9af5
chore: use PropertyKey type (#11056)
close #8559
2024-06-06 18:23:21 +08:00
Evan You 124c4cac83
fix(types): props in defineOptions type should be optional
close #10841
2024-04-30 09:05:41 -07:00
Evan You 75c8cf63a1
feat(types): provide internal options for directly using user types in language tools (#10801) 2024-04-27 11:48:37 +08:00
Thimo Sietsma 37ba93c213
fix(types): avoid merging object union types when using withDefaults (#10596)
close #10594
2024-04-15 22:50:34 +08:00
Wes Cook a653a8c125
chore: fix typo (#10621) 2024-04-01 16:20:01 +08:00
Evan You 8fda856a82 refactor: split out useModel implementation and tests 2024-01-11 18:04:47 +08:00
skirtle 10ccb9bfa0
fix(defineModel): support kebab-case/camelCase mismatches (#9950) 2024-01-03 18:18:35 +08:00
Evan You 97ce041910 fix(defineModel): support local mutation when only prop but no listener is passed 2023-12-30 08:57:55 +08:00
Evan You 9bc3c7e29c fix(defineModel): always default modifiers to empty object
close #9945
2023-12-30 08:26:48 +08:00
Evan You a772031ea8 feat(defineModel): support modifiers and transformers 2023-12-26 22:13:04 +08:00
三咲智子 Kevin Deng bfe6b459d3
style: update format & lint config (#9162)
Co-authored-by: 丶远方 <yangpanteng@gmail.com>
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
Co-authored-by: Guo Xingjun <99574369+Plumbiu@users.noreply.github.com>
2023-12-26 19:39:47 +08:00
edison eb12f211b8
fix(defineModel): ensure trigger effect when prop changed (#9841)
close #9838
2023-12-16 12:15:30 +08:00
三咲智子 Kevin Deng ef688ba92b
feat(compiler-sfc): promote defineModel stable (#9598) 2023-12-12 17:28:40 +08:00
Evan You 74387929cd chore: update defineModel comment docs [ci skip] 2023-12-12 17:04:16 +08:00
Evan You f74785bc4a feat(defineModel): support local mutation by default, remove local option
ref https://github.com/vuejs/rfcs/discussions/503#discussioncomment-7566278
2023-12-12 16:47:34 +08:00
Evan You 7e60d1058f perf: use sync watcher for defineModel local mode
ref https://github.com/vuejs/rfcs/discussions/503#discussioncomment-7566278
2023-12-12 13:49:23 +08:00
Evan You 982a145d38 chore: Merge branch 'main' into minor 2023-12-11 22:03:28 +08:00
三咲智子 Kevin Deng 096ba81817
feat(types): expose `DefineProps` type 2023-12-09 00:34:28 +08:00
Evan You b4ac0e6ac1 chore(dx): fix defineProps jsdoc + update defineEmits jsdoc example 2023-12-07 14:30:32 +08:00
zqran f15debc01a
fix(types): return type of withDefaults should be readonly (#8601) 2023-11-10 15:20:02 +08:00
Carlos Rodrigues 94c049d930
fix(types): remove optional properties from defineProps return type (#6421)
close #6420
2023-11-09 14:52:28 +08:00
zqran f07cb18fed
fix(types): correct withDefaults return type for boolean prop with undefined default value (#8602) 2023-07-11 18:35:22 +08:00
Phentom f0691e4581
chore: typo (#8345) [ci skip] 2023-05-19 07:59:09 +08:00
Carlos Rodrigues 216f26995b
fix(types): support generic usage with withDefaults + defineProps (#8335)
fix #8310
fix #8331
fix #8325
2023-05-17 09:25:48 +08:00
Cédric Exbrayat ab9256a4bb
chore: fix typos in defineOptions (#8277) 2023-05-11 19:34:27 +08:00
Evan You 1279b17300 fix(types): remove short syntax support in defineSlots()
ref: https://github.com/vuejs/language-tools/issues/2758
2023-05-08 11:53:49 +08:00
Himself65 c94ef02421
fix(runtime-core): properly merge props and emits options from mixins (#8052)
close #7989
2023-04-10 15:06:21 +08:00
三咲智子 Kevin Deng 14f3d747a3
feat(sfc): introduce `defineModel` macro and `useModel` helper (#8018) 2023-04-08 12:13:05 +08:00
Evan You 91a931ae87 fix(types): improve defineProps return type with generic arguments 2023-04-05 17:21:31 +08:00
三咲智子 Kevin Deng 5a2f5d59cf
feat(types/slots): support slot presence / props type checks via `defineSlots` macro and `slots` option (#7982) 2023-04-03 16:49:16 +08:00
Evan You dfb21a5363 chore: add docs links for sfc macros 2023-04-02 10:02:33 +08:00
Evan You 4af5d1b075 feat(sfc): revert withDefaults() deprecation
In some cases, the user still needs access to the full props object,
in such cases withDefaults() is still needed.
2023-03-31 08:53:15 +08:00
Evan You 8876dccf42
feat(sfc): support more ergnomic defineEmits type syntax (#7992) 2023-03-30 19:24:32 +08:00
Evan You ba9c2ae247
feat(compiler-sfc): enable reactive props destructure by default and deprecate withDefaults() (#7986) 2023-03-30 11:58:16 +08:00
Evan You e10a89e608 fix(compiler-sfc): fix function default value handling w/ props destructure 2023-03-29 22:21:27 +08:00
三咲智子 Kevin Deng 93f77292c9
fix(compiler-sfc): disallow `expose` property in `defineOptions` (#7967) 2023-03-28 17:32:37 +08:00
三咲智子 Kevin Deng bcf5841dde
feat(compiler-sfc): add defineOptions macro (#5738) 2023-03-28 10:43:51 +08:00
Evan You c288c7b0bd fix(types): ensure defineProps with generics return correct types 2023-03-26 15:58:04 +08:00
Evan You 4c9bfd2b99 feat(dx): improve readability of displayed types for props 2023-03-24 15:06:43 +08:00
Evan You 1ddde63b40 build: adjust dts test setup 2023-02-03 17:10:31 +08:00
三咲智子 Kevin Deng a0a010ddc9
fix(types): optional boolean props should have boolean type in return type of defineProps (#7619)
close #7116
fix #5847
fix #7487
2023-02-01 21:57:28 -05:00
littleboarx 168c857247
fix(sfc/types): improve the type inference using withDefaults (#6764)
fix #6552
2022-11-07 21:59:31 -05:00
Alex Kozack b5462822d6
fix(sfc/types): allow use default factory for primitive types in `withDefaults` (#5939)
fix #5938
2022-05-22 20:28:39 -04:00
Yugang Cao e603fd258c
chore: fix typo (#5261) [ci skip] 2022-01-21 01:18:34 -05:00