@@ -59,6 +59,8 @@ const warnRuntimeUsage = (method: string) =>
59
59
* foo?: string
60
60
* bar: number
61
61
* }>()
62
+ *
63
+ * @see {@link https://vuejs.org/api/sfc-script-setup.html#defineprops-defineemits }
62
64
* ```
63
65
*
64
66
* This is only usable inside `<script setup>`, is compiled away in the
@@ -118,6 +120,8 @@ type BooleanKey<T, K extends keyof T = keyof T> = K extends any
118
120
*
119
121
* This is only usable inside `<script setup>`, is compiled away in the
120
122
* output and should **not** be actually called at runtime.
123
+ *
124
+ * @see {@link https://vuejs.org/api/sfc-script-setup.html#defineprops-defineemits }
121
125
*/
122
126
// overload 1: runtime emits w/ array
123
127
export function defineEmits < EE extends string = string > (
@@ -156,6 +160,8 @@ type ShortEmits<T extends Record<string, any>> = UnionToIntersection<
156
160
*
157
161
* This is only usable inside `<script setup>`, is compiled away in the
158
162
* output and should **not** be actually called at runtime.
163
+ *
164
+ * @see {@link https://vuejs.org/api/sfc-script-setup.html#defineexpose }
159
165
*/
160
166
export function defineExpose <
161
167
Exposed extends Record < string , any > = Record < string , any >
@@ -165,6 +171,13 @@ export function defineExpose<
165
171
}
166
172
}
167
173
174
+ /**
175
+ * Vue `<script setup>` compiler macro for declaring a component's additional
176
+ * options. This should be used only for options that cannot be expressed via
177
+ * Composition API - e.g. `inhertiAttrs`.
178
+ *
179
+ * @see {@link https://vuejs.org/api/sfc-script-setup.html#defineoptions }
180
+ */
168
181
export function defineOptions <
169
182
RawBindings = { } ,
170
183
D = { } ,
@@ -232,6 +245,8 @@ type PropsWithDefaults<Base, Defaults> = Base & {
232
245
*
233
246
* This is only usable inside `<script setup>`, is compiled away in the output
234
247
* and should **not** be actually called at runtime.
248
+ *
249
+ * @see {@link https://vuejs.org/guide/typescript/composition-api.html#typing-component-props }
235
250
*/
236
251
export function withDefaults < Props , Defaults extends InferDefaults < Props > > (
237
252
props : Props ,
0 commit comments