Using TypeScript in v2.0?
See original GitHub issueSince 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.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:12 (6 by maintainers)
Top 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 >
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 Free
Top 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
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.
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.