Skip to content

Commit

Permalink
markTasAsDone -> markTaskAsDone (#2270)
Browse files Browse the repository at this point in the history
fix a typo in the docs
  • Loading branch information
therumbler authored Sep 9, 2024
1 parent ac38c6a commit 4781aa6
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions web/docs/data-model/operations/actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,24 +272,24 @@ Wasp authenticates the logged-in user in the background.
<TabItem value="js" label="JavaScript">

```js
import { createTask, markTasAsDone } from 'wasp/client/operations'
import { createTask, markTaskAsDone } from 'wasp/client/operations'

// ...

const newTask = await createTask({ description: 'Learn TypeScript' })
await markTasAsDone({ id: 1 })
await markTaskAsDone({ id: 1 })
```

</TabItem>
<TabItem value="ts" label="TypeScript">

```ts
import { createTask, markTasAsDone } from 'wasp/client/operations'
import { createTask, markTaskAsDone } from 'wasp/client/operations'

// TypeScript automatically infers the return values and type-checks
// the payloads.
const newTask = await createTask({ description: 'Keep learning TypeScript' })
await markTasAsDone({ id: 1 })
await markTaskAsDone({ id: 1 })
```

Wasp supports **automatic full-stack type safety**.
Expand Down Expand Up @@ -388,22 +388,22 @@ Here's what you have to do differently:
<TabItem value="js" label="JavaScript">

```js
import { createTask, markTasAsDone } from 'wasp/server/operations'
import { createTask, markTaskAsDone } from 'wasp/server/operations'

const user = // Get an AuthUser object, e.g., from context.user

const newTask = await createTask(
{ description: 'Learn TypeScript' },
{ user },
)
await markTasAsDone({ id: 1 }, { user })
await markTaskAsDone({ id: 1 }, { user })
```

</TabItem>
<TabItem value="ts" label="TypeScript">

```ts
import { createTask, markTasAsDone } from 'wasp/server/operations'
import { createTask, markTaskAsDone } from 'wasp/server/operations'

const user = // Get an AuthUser object, e.g., from context.user

Expand All @@ -413,7 +413,7 @@ const newTask = await createTask(
{ description: 'Keep learning TypeScript' },
{ user },
)
await markTasAsDone({ id: 1 }, { user })
await markTaskAsDone({ id: 1 }, { user })
```

</TabItem>
Expand Down

0 comments on commit 4781aa6

Please sign in to comment.