TypeScript Alternatives
-
io-ts
Runtime type system for IO decoding/encoding
-
Visual Studio Code
Visual Studio Code
-
Scout
Get performance insights in less than 4 minutes. Scout APM uses tracing logic that ties bottlenecks to source code so you know the exact line of code causing performance issues and can get back to building a great product faster.
-
vscode-remote-release
Visual Studio Code Remote Development: Open any folder in WSL, in a Docker container, or on a remote machine using SSH and take advantage of VS Code's full feature set.
-
runtypes
Runtime validation for static types
-
DefinitelyTyped
The repository for high quality TypeScript type definitions.
-
pyright
Static type checker for Python
-
zod
TypeScript-first schema validation with static type inference
-
proposal-decorators
Decorators for ES6 classes
-
knuth-literate-programs
Examples of literate programming by Knuth
-
nestor
A parallel implementation of NESTOR in Python 3
-
swift-refined
Simple refinement types for Swift
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Elasticsearch
Free and Open, Distributed, RESTful Search Engine
-
moment
Parse, validate, manipulate, and display dates in javascript.
-
Scrapy
Scrapy, a fast high-level web crawling & scraping framework for Python.
-
immutable-js
Immutable persistent data collections for Javascript which increase efficiency and simplicity.
-
NumPy
The fundamental package for scientific computing with Python.
-
Sinatra
Classy web-development dressed in a DSL (official / canonical repo)
-
faker
A library for generating fake data such as names, addresses, and phone numbers. (by faker-ruby)
-
pytest
The pytest framework makes it easy to write small tests, yet scales to support complex functional testing
Posts
- It Can Happen to You
-
How an Anti-TypeScript “JavaScript developer” like me became a TypeScript fan
This particular example is close to my heart: the definition files for things like JSON.parse() were written before the "unknown" type was introduced as an alternative to "any"
And because this "any" is coming from an external definition file, it can't be caught by tsc's --noImplicitAny nor eslint's no-explicit-any
Those two rules allow us to protect us from our own code, but not external definitions/libraries. Relevant GitHub issue here — https://github.com/microsoft/TypeScript/issues/26188
-
Javascript
Now, JavaScript was built with the idea that it should keep on trucking through any error, which frankly is a horrible idea to build a language around. So given the interesting design philosophy JavaScript really couldn't do anything else. There's a reason Typescript is so common after all, but unfortunately it does nothing about this particular issue. (There's an issue for it but it's been inactive for a while: https://github.com/microsoft/TypeScript/issues/18286)
-
Better Error Messages in TypeScript 4.2 - Smarter Type Alias Preservation
As Daniel Rosenwasser mentioned in the announcement, these improvements were made possible by two pull requests, by Anders Hejlsberg (PR1 , PR2). I will not get into the implementation details here. However, I encourage you to skim through the changes in src/compiler/checker.ts, or the pull requests' descriptions.
-
Just found out that you can't trust the TS transpiler with union types. A more complicated version of this made it to production and robbed me of my sanity...
Doesn't even have to be a mutation, actually. A union interface and (type) inheritance is also problematic, see here. The more I dig into this the more examples I find lol.
https://github.com/microsoft/TypeScript/issues/14150#issuecomment-281542562
There seems to be a corresponding github issue with more information. It seems like the original reference type is being ignored when an additional pointer to the same object is of a union type.
Unfortunately, issues like these, as described here and here, are enough for me to not trust the TS compiler, anymore. It's essentially just an IntelliSense annotation library at this point and I would love to see what kind of typing holes other people have in their production code.
-
Just Found Out That You Cant Trust The Ts
Actually, I am not sure if this is actually the same problem. I think the issue I encountered is this.
-
How can I generate types using AST?
Been doing a little bit of digging into how to do code generation with typescript, but I'm struggling to find resources on how to actually use the ts factory API without going directly into the source code. So far, this has been the most useful excerpt I've found: https://github.com/microsoft/TypeScript/wiki/Using-the-Compiler-API#creating-and-printing-a-typescript-ast
-
Top skills you need to master angular 👨💻
Typescript by far is the most adopted technology in web development it helps you make your code type-safe and future proof. First, you need to know that typescript isn't a completely different programming language actually, it is called javascript superset language because every valid javascript syntax is also valid in typescript and you can check their goals for more details especially points 6,7 and 8. Second, javascript has types but it is a loosely typed language it means that when you declare a variable as a string you can change it later to the number, and the javascript engine will not complain so using typescript to make our code strongly typed to prevent and catch those errors earlier, Finally typescript is a compiler whiches is used to convert your code to normal javascrpt without types and on top of that angular build custom compiler called ngtsc It is a typescript compiler with a set of Angular transforms.
-
On TypeScript unions
The recommended way to do it is by having a constant string-type field in the object. For TypeScript will infer the type using that field as an anchor. The same way it does with primitive types.
-
Transform source code files and pretty print as multiline again?
Hm, if it were typescript I'd tell you to look into the compiler API, which lets you traverse code as an AST and perform transformations. Should work fine for plain javascript, too. Maybe there is something similar for .jsx files? 🤷♂️
-
Announcing TypeScript 4.2
Is this fix included in 4.2?
Stats
Microsoft/TypeScript is an open source project licensed under Apache License 2.0 which is an OSI approved license.