Skip to content

Commit

Permalink
docs: update model.md (tsedio#2359)
Browse files Browse the repository at this point in the history
* Update model.md

Fix location of deserialize function to be the one provided by the library.

* Update model.md

Add generic example for deserialize to docs
  • Loading branch information
csprance authored Jun 16, 2023
1 parent 3829607 commit 417d0a0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/docs/model.md
Original file line number Diff line number Diff line change
Expand Up @@ -677,9 +677,9 @@ So by using the @@deserialize@@ function with the extra groups options, we can m
<Tab label="Creation">

```typescript
import {deserialize} from "json-schema";
import { deserialize } from '@tsed/json-mapper';

const result = deserialize(
const result = deserialize<User>(
{
id: "id", // will be ignored because creation doesn't include `id` field
firstName: "firstName",
Expand All @@ -697,9 +697,9 @@ console.log(result); // User {firstName, lastName, email, password}
<Tab label="With group">

```typescript
import {deserialize} from "json-schema";
import { deserialize } from '@tsed/json-mapper';

const result = deserialize(
const result = deserialize<User>(
{
id: "id",
firstName: "firstName",
Expand All @@ -718,9 +718,9 @@ console.log(result); // User {id, firstName, lastName, email, password}
<Tab label="With glob pattern">

```typescript
import {deserialize} from "json-schema";
import { deserialize } from '@tsed/json-mapper';

const result = deserialize(
const result = deserialize<User>(
{
id: "id",
firstName: "firstName",
Expand Down

0 comments on commit 417d0a0

Please sign in to comment.