Commit Graph

33 Commits

Author SHA1 Message Date
三咲智子 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
Noel De Martin 34985fee6b
feat(types/script-setup): add generic type to defineExpose (#5035) 2021-12-05 23:25:35 -05:00
Thorsten Lünborg f2d2d7b2d2
fix(types): scrip-setup+ts: ensure proper handling of `null` as default prop value. (#4979)
fix #4868
2021-11-25 04:33:29 -05:00
Cathrine Vaage 04e5835196
fix(types/sfc): fix withDefaults type inference when using union types (#4925) 2021-11-14 22:09:00 -05:00
Evan You 467e113b95
feat(compiler-sfc): `<script setup>` defineProps destructure transform (#4690) 2021-09-27 14:24:21 -04:00
edison 5594643d7b
fix(compiler-sfc): fix script setup ref assignment codegen edge case (#4520)
fix #4514
2021-09-05 18:02:50 -04:00
Evan You 47f488350c chore: run updated prettier 2021-07-19 18:24:18 -04:00
Evan You 1bab53e717 chore: remove deprecated defineEmit & useContext APIs 2021-07-16 16:56:51 -04:00
Anthony Fu f5617fc3bb feat(reactivity): new effectScope API (#2195) 2021-07-16 14:30:49 -04:00
Evan You 03e26845e2 fix(sfc): fix `<script setup>` async context preservation logic
fix #4050
2021-07-06 14:31:53 -04:00
Evan You 438754a0d1 fix(build): avoid using async/await syntax 2021-07-02 08:06:25 -04:00
Evan You 9ee41e14d2 fix: prevent withAsyncContext currentInstance leak in edge cases 2021-06-29 14:22:18 -04:00
Evan You 0240e82a38 feat(sfc): auto restore current instance after await statements in async setup() 2021-06-29 09:24:12 -04:00
Evan You ef5c41523f types: fix global helpers dts generation 2021-06-26 21:47:18 -04:00
Evan You 004bd18cf7 feat(sfc/types): make `<script setup>` helper types available globally 2021-06-26 21:12:26 -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
Evan You 1675b6d723 fix: defineExpose type definition and runtime warning 2021-06-25 16:18:21 -04:00
Evan You ac853ff4ab test: fix script setup helpers tests 2021-06-23 10:31:32 -04:00
Evan You 63e9e2e9aa feat(sfc): useAttrs + useSlots
Deprecate useContext
2021-06-22 21:07:42 -04:00
Eduardo San Martin Morote a137da8a9f
feat(sfc): add `defineEmits` and deprecate `defineEmit` (#3725) 2021-06-22 15:02:56 -04:00
Evan You 426a6c996e test: tests for script setup helpers 2020-11-26 10:01:36 -05:00
Evan You 73cdb9d420 fix(script-setup): ensure useContext() return valid context 2020-11-26 09:25:56 -05:00
Evan You bdc66c7ea4 wip: revert helpers to compiler-only 2020-11-24 19:04:21 -05:00
Evan You 47d73c23e1 wip: defineOptions -> defineProps + defineEmit + useContext 2020-11-24 19:04:21 -05:00