Skip to content

Commit 7f55589

Browse files
authored
docs: remarks about minor versions (#2990)
docs: remarks about minor version (follow up to b6339b6)
1 parent bfcf01f commit 7f55589

7 files changed

+23
-18
lines changed

src/api/application.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,10 +285,10 @@ Provide a value that can be injected in all descendant components within the app
285285

286286
## app.runWithContext() {#app-runwithcontext}
287287

288-
Execute a callback with the current app as injection context.
289-
290288
- Only supported in 3.3+
291289

290+
Execute a callback with the current app as injection context.
291+
292292
- **Type**
293293

294294
```ts

src/api/built-in-special-attributes.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ Used for binding [dynamic components](/guide/essentials/component-basics#dynamic
9191

9292
- **Expects:** `string | Component`
9393

94-
- **Usage on native elements** <sup class="vt-badge">3.1+</sup>
94+
- **Usage on native elements**
95+
96+
- Only supported in 3.1+
9597

9698
When the `is` attribute is used on a native HTML element, it will be interpreted as a [Customized built-in element](https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-customized-builtin-example), which is a native web platform feature.
9799

src/api/composition-api-dependency-injection.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,10 @@ Injects a value provided by an ancestor component or the application (via `app.p
109109

110110
## hasInjectionContext() {#has-injection-context}
111111

112-
Returns true if [inject()](#inject) can be used without warning about being called in the wrong place (e.g. outside of `setup()`). This method is designed to be used by libraries that want to use `inject()` internally without triggering a warning to the end user.
113-
114112
- Only supported in 3.3+
115113

114+
Returns true if [inject()](#inject) can be used without warning about being called in the wrong place (e.g. outside of `setup()`). This method is designed to be used by libraries that want to use `inject()` internally without triggering a warning to the end user.
115+
116116
- **Type**
117117

118118
```ts

src/api/options-rendering.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ Configure runtime compiler options for the component's template.
8686

8787
## slots<sup class="vt-badge ts"/> {#slots}
8888

89-
An option to assist with type inference when using slots programmatically in render functions. Only supported in 3.3+.
89+
- Only supported in 3.3+
90+
91+
An option to assist with type inference when using slots programmatically in render functions.
9092

9193
- **Details**
9294

src/api/reactivity-utilities.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,12 @@ Can also be used to create a ref for a property on a source reactive object. The
134134
135135
## toValue() {#tovalue}
136136
137+
- Only supported in 3.3+
138+
137139
Normalizes values / refs / getters to values. This is similar to [unref()](#unref), except that it also normalizes getters. If the argument is a getter, it will be invoked and its return value will be returned.
138140
139141
This can be used in [Composables](/guide/reusability/composables.html) to normalize an argument that can be either a value, a ref, or a getter.
140142
141-
- Only supported in 3.3+
142-
143143
- **Type**
144144
145145
```ts

src/api/sfc-script-setup.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,9 @@ defineExpose({
379379

380380
When a parent gets an instance of this component via template refs, the retrieved instance will be of the shape `{ a: number, b: number }` (refs are automatically unwrapped just like on normal instances).
381381

382-
## defineOptions() <sup class="vt-badge" data-text="3.3+" /> {#defineoptions}
382+
## defineOptions() {#defineoptions}
383+
384+
- Only supported in 3.3+
383385

384386
This macro can be used to declare component options directly inside `<script setup>` without having to use a separate `<script>` block:
385387

@@ -394,11 +396,12 @@ defineOptions({
394396
</script>
395397
```
396398

397-
- Only supported in 3.3+.
398399
- This is a macro. The options will be hoisted to module scope and cannot access local variables in `<script setup>` that are not literal constants.
399400

400401
## defineSlots()<sup class="vt-badge ts"/> {#defineslots}
401402

403+
- Only supported in 3.3+
404+
402405
This macro can be used to provide type hints to IDEs for slot name and props type checking.
403406

404407
`defineSlots()` only accepts a type parameter and no runtime arguments. The type parameter should be a type literal where the property key is the slot name, and the value type is the slot function. The first argument of the function is the props the slot expects to receive, and its type will be used for slot props in the template. The return type is currently ignored and can be `any`, but we may leverage it for slot content checking in the future.
@@ -413,8 +416,6 @@ const slots = defineSlots<{
413416
</script>
414417
```
415418

416-
- Only supported in 3.3+.
417-
418419
## `useSlots()` & `useAttrs()` {#useslots-useattrs}
419420

420421
Usage of `slots` and `attrs` inside `<script setup>` should be relatively rare, since you can access them directly as `$slots` and `$attrs` in the template. In the rare case where you do need them, use the `useSlots` and `useAttrs` helpers respectively:

src/api/utility-types.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ Used to annotate a prop with more advanced types when using runtime props declar
3434

3535
## MaybeRef\<T> {#mayberef}
3636

37-
Alias for `T | Ref<T>`. Useful for annotating arguments of [Composables](/guide/reusability/composables.html).
37+
- Only supported in 3.3+
3838

39-
- Only supported in 3.3+.
39+
Alias for `T | Ref<T>`. Useful for annotating arguments of [Composables](/guide/reusability/composables.html).
4040

4141
## MaybeRefOrGetter\<T> {#maybereforgetter}
4242

43-
Alias for `T | Ref<T> | (() => T)`. Useful for annotating arguments of [Composables](/guide/reusability/composables.html).
43+
- Only supported in 3.3+
4444

45-
- Only supported in 3.3+.
45+
Alias for `T | Ref<T> | (() => T)`. Useful for annotating arguments of [Composables](/guide/reusability/composables.html).
4646

4747
## ExtractPropTypes\<T> {#extractproptypes}
4848

@@ -77,9 +77,9 @@ To extract public facing props, i.e. props that the parent is allowed to pass, u
7777
7878
## ExtractPublicPropTypes\<T> {#extractpublicproptypes}
7979
80-
Extract prop types from a runtime props options object. The extracted types are public facing - i.e. the props that the parent is allowed to pass.
80+
- Only supported in 3.3+
8181
82-
- Only supported in 3.3+.
82+
Extract prop types from a runtime props options object. The extracted types are public facing - i.e. the props that the parent is allowed to pass.
8383
8484
- **Example**
8585

0 commit comments

Comments
 (0)