Typescript code examples are broken
See original GitHub issueWhat 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:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I might be neglecting Gitter a bit 😃 But normally I see notification and me or some other people reply the questions.
Wow, that was the case, thanks!!!