Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to include Definitely Typed library to my deno project?

How do I use the deno’s node compatibility mode with definitely typed modules? I tried this but that didn’t seem to work as intended.

/// <reference types='npm:@types/three' />

  1. I simply want the types available globally within my project
  2. I do not want three.js library included in my code, only types

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

As of Deno v1.26.1, TypeScript is not supported in Node compatibility mode. From the Node Compatibility Mode page in the manual:

TypeScript support

Currently, the compatibility mode does not support TypeScript.

In the upcoming releases we plan to add support for a types field in package.json, to automatically lookup types and use them during type checking.

In the long term, we’d like to provide ability to consume TypeScript code authored for the Node runtime.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading