question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Typescript code examples are broken

See original GitHub issue

What version of Ajv are you using? Does the issue happen if you use the latest version?

I just installed Ajv and using the latest version

Ajv options object

I don’t use this

I tried to run the example code(s) from the official website but I get compile errors.

If I try to do this:

import Ajv, {JTDDataType} from "ajv/dist/jtd"

I get Cannot find module 'ajv/dist/jtd' or its corresponding type declarations.

If I try the another example that’s supposed to work with Typescript:

import Ajv, {JSONSchemaType} from "ajv"

I get Module '"ajv"' has no exported member 'JSONSchemaType'.

What am I doing wrong?

I installed with

npm install ajv

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
epoberezkincommented, Sep 24, 2021

I might be neglecting Gitter a bit 😃 But normally I see notification and me or some other people reply the questions.

1reaction
adam-aroldcommented, Sep 24, 2021

Wow, that was the case, thanks!!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeScript errors and how to fix them
Common Errors. Below you find a list of common TypeScript errors along with the buggy code and its fixed version. If you're interested...
Read more >
TypeScript example is broken in documentation #696 - GitHub
When trying to run this typescript example from documentation, I get many typescript ... TypeScript example is broken in documentation #696.
Read more >
Promise made and promise broken: TypeScript vs. real life data
Code that relies on external services is then either left to trust those services will communicate as they typed they would, or, rather...
Read more >
TypeScript syntax highlighting partially broken VS 15.9.3
TypeScript syntax highlighting is partially broken on Visual Stusio 15.9.3. ... Do you have a full code example for which the highlighting always...
Read more >
Google TypeScript Style Guide
For example, generated proto code is always nullable, but perhaps it is well-known in the context of the code that certain fields are...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found