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.

Using TypeScript in v2.0?

See original GitHub issue

Since we’ll move to ESM for v2.0, Prism will be a lot easy to understand for static analyzers such as TypeScript. I’ve been wondering if we should add TypeScript to Prism in some form (either using TypeScript directly (.ts files) or using JSDoc).

To be clear, this is a question. The goal of this issue is to find out if and to what extent we want to use TypeScript in v2.0.

@LeaVerou @Golmote @mAAdhaTTah

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:3
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
RunDevelopmentcommented, Sep 6, 2022

Progress update: v2 is now type checked via JSDoc + .d.ts.

This includes the main library (Core, languages, plugins, etc.) and tests. Our various scripts (benchmark, danger, gulp) and the scripts of the website are not yet included. They are low-priority targets for type checking anyway.

The next part will be to figure out how to generate useable type definitions for our users.

2reactions
anandtiwarycommented, Jun 4, 2021

I would vote for converting this into a TS lib. It is not very different in terms of implementation. Lots of projects are on TS now and if we can support it, all those downstream projects will benefit from the type safety. I am happy to contribute if this route is approved.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation - TypeScript 2.0
With TypeScript 2.0, the type checker analyses all possible flows of control in statements and expressions to produce the most specific type possible...
Read more >
TypeScript 2.0 is now available!
With this release, TypeScript delivers close ECMAScript spec alignment, wide support for JavaScript libraries and tools, and a language service ...
Read more >
Getting Started With TypeScript 2.0 - C# Corner
Hi friends! In this series of articles, we are going to learn TypeScript with all the features of TypeScript 1.x along with TypeScript...
Read more >
Your project is built using TypeScript 2.0, but ... - Stack Overflow
As you can see, in my project properties, TypeScript version 2.0 (2.0.6 specifically) is chosen from the NuGet package. But then, I get...
Read more >
Sign-In with Ethereum - API Harmonization and TypeScript v2 ...
Additional Developer Notes for the TypeScript v2.0 Beta Release · validate(…) was deprecated and renamed to verify(…) with a new API. · ethers...
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