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

Update typescript.md #2528

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
12 changes: 6 additions & 6 deletions docs/guide/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ For the same example as in [Getting started](./getting-started):
<code-group>
<code-block title="JSON Schema">
```typescript
import Ajv, {JSONSchemaType} from "ajv"
import {Ajv, JSONSchemaType} from "ajv"
const ajv = new Ajv()

interface MyData {
Expand Down Expand Up @@ -61,7 +61,7 @@ if (validate(data)) {

<code-block title="JSON Type Definition">
```typescript
import Ajv, {JTDSchemaType} from "ajv/dist/jtd"
import {Ajv, JTDSchemaType} from "ajv/dist/jtd.js"
const ajv = new Ajv()

interface MyData {
Expand Down Expand Up @@ -110,7 +110,7 @@ You can use JTD schema to construct the type of data using utility type `JTDData
<code-group>
<code-block title="JSON Type Definition">
```typescript
import Ajv, {JTDDataType} from "ajv/dist/jtd"
import {Ajv, JTDDataType} from "ajv/dist/jtd.js"
const ajv = new Ajv()

const schema = {
Expand Down Expand Up @@ -181,7 +181,7 @@ if (validate(data)) {

<code-block title="JSON Type Definition">
```typescript
import {JTDErrorObject} from "ajv/dist/jtd"
import {JTDErrorObject} from "ajv/dist/jtd.js"

// ...

Expand Down Expand Up @@ -214,7 +214,7 @@ This example uses the same data and schema types as above:
<code-group>
<code-block title="JSON Type Definition">
```typescript
import Ajv, {JTDSchemaType} from "ajv/dist/jtd"
import {Ajv, JTDSchemaType} from "ajv/dist/jtd.js"
const ajv = new Ajv()

interface MyData {
Expand Down Expand Up @@ -290,7 +290,7 @@ Here's a more detailed example showing several union types:
<code-group>
<code-block title="JSON Schema">
```typescript
import Ajv, {JSONSchemaType} from "ajv"
import {Ajv, JSONSchemaType} from "ajv"
const ajv = new Ajv()

type MyUnion = {prop: boolean} | string | number
Expand Down
Loading