Skip to content

Commit 0391e2e

Browse files
fix: change the language on some code blocks to match the code (#783)
1 parent c39a08e commit 0391e2e

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

src/api/global-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ For example, for runtime-dom, HostNode would be the DOM
403403

404404
Custom renderers can pass in the platform specific types like this:
405405

406-
```js
406+
```ts
407407
import { createRenderer } from 'vue'
408408
const { render, createApp } = createRenderer<Node, Element>({
409409
patchProp,

src/api/refs-api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ foo.value = 123 // ok!
3838

3939
If the type of the generic is unknown, it's recommended to cast `ref` to `Ref<T>`:
4040

41-
```js
41+
```ts
4242
function useState<State extends string>(initial: State) {
4343
const state = ref(initial) as Ref<State> // state.value -> State extends string
4444
return state
@@ -49,7 +49,7 @@ function useState<State extends string>(initial: State) {
4949

5050
Returns the inner value if the argument is a [`ref`](#ref), otherwise return the argument itself. This is a sugar function for `val = isRef(val) ? val.value : val`.
5151

52-
```js
52+
```ts
5353
function useFoo(x: number | Ref<number>) {
5454
const unwrapped = unref(x) // unwrapped is guaranteed to be number now
5555
}

src/cookbook/debugging-in-vscode.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ Please note that if the page uses a production/minified build of Vue.js (such as
102102

103103
The example above has a great workflow. However, there is an alternative option where you can use the [native debugger statement](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger) directly in your code. If you choose to work this way, it's important that you remember to remove the statements when you're done.
104104

105-
```js
105+
```vue
106106
<script>
107107
export default {
108108
data() {

src/guide/migration/functional-components.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ export default {
4444

4545
Or, for those who preferred the `<template>` in a single-file component:
4646

47-
```js
48-
// Vue 2 Functional Component Example with <template>
47+
```vue
48+
<!-- Vue 2 Functional Component Example with <template> -->
4949
<template functional>
5050
<component
5151
:is="`h${props.level}`"
@@ -91,7 +91,7 @@ In 3.x, the performance difference between stateful and functional components ha
9191

9292
Using our `<dynamic-heading>` example from before, here is how it would look now.
9393

94-
```js{1,3,4}
94+
```vue{1,3,4}
9595
<template>
9696
<component
9797
v-bind:is="`h${$props.level}`"

src/guide/migration/inline-template-attribute.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Most of the use cases for `inline-template` assumes a no-build-tool setup, where
3434

3535
The most straightforward workaround in such cases is using `<script>` with an alternative type:
3636

37-
```js
37+
```html
3838
<script type="text/html" id="my-comp-template">
3939
<div>{{ hello }}</div>
4040
</script>

0 commit comments

Comments
 (0)