Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix typos #2808

Merged
merged 1 commit into from
Oct 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/docs/cookbook/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ expect(store.someAction).toHaveBeenCalledTimes(1)

### Mocking the returned value of an action

Actions are automatically spied but type-wise, they are still the regular actions. In order to get the correct type, we must implement a custom type-wrapper that is applies the `Mock` type to each action. **This type depends on the testing framework you are using**. Here is an example with Vitest:
Actions are automatically spied but type-wise, they are still the regular actions. In order to get the correct type, we must implement a custom type-wrapper that applies the `Mock` type to each action. **This type depends on the testing framework you are using**. Here is an example with Vitest:

```ts
import type { Mock } from 'vitest'
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/core-concepts/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ This is why you can access all computed properties without `.value` and why they
If you want to add new state properties to a store or properties that are meant to be used during hydration, **you will have to add it in two places**:

- On the `store` so you can access it with `store.myState`
- On `store.$state` so it can be used in devtools and, **be serialized during SSR**.
- On `store.$state` so it can be used in devtools and **be serialized during SSR**.

On top of that, you will certainly have to use a `ref()` (or other reactive API) in order to share the value across different accesses:

Expand Down
4 changes: 2 additions & 2 deletions packages/docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ Pinia is a store library for Vue, it allows you to share a state across componen
- Testing utilities
- Plugins: extend Pinia features with plugins
- Proper TypeScript support or **autocompletion** for JS users
- Server Side Rendering Support
- Server Side Rendering support
- Devtools support
- A timeline to track actions, mutations
- A timeline to track actions and mutations
- Stores appear in components where they are used
- Time travel and easier debugging
- Hot module replacement
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/zh/cookbook/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ expect(store.someAction).toHaveBeenCalledTimes(1)

### Mocking the returned value of an action

Actions are automatically spied but type-wise, they are still the regular actions. In order to get the correct type, we must implement a custom type-wrapper that is applies the `Mock` type to each action. **This type depends on the testing framework you are using**. Here is an example with Vitest:
Actions are automatically spied but type-wise, they are still the regular actions. In order to get the correct type, we must implement a custom type-wrapper that applies the `Mock` type to each action. **This type depends on the testing framework you are using**. Here is an example with Vitest:

```ts
import type { Mock } from 'vitest'
Expand Down