Skip to content
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