Our great sponsors
-
https://github.com/microsoft/vscode/blob/main/src/vs/editor/...
The typings on the class variables are useful to have. There are also typings on the function signatures, not a huge deal.
In the method bodies there are almost no typings as all of it is already inferred. Seems pretty readable to me.
-
-
Appwrite
Appwrite - The Open Source Firebase alternative introduces iOS support . Appwrite is an open source backend server that helps you build native iOS applications much faster with realtime APIs for authentication, databases, files storage, cloud functions and much more!
-
> There's even the future possibility of much of its type syntax being absorbed back into JavaScript: https://github.com/tc39/proposal-type-annotations
... as comments. Which superficially resemble the syntax of type hints but do nothing. Which has to be one of the worst language design decisions of all time.
-
Probably because it compiles them to a pre-standard ES5-compatible implementation based on good ol' `Foo.prototype`. And since they've already handled them one way, they can't become spec-compliant without breaking backwards compatibility.
The other place where this shines through particularly egregiously is the support of ESM static import/export. Everybody's build tools been compiling that back down to CJS so hard that Node.js 16+ introduced intentional incompatibilities between CJS and ESM modes just to get people to finally switch to the standards-compliant module system. So you end up in a situation where the library is written in TypeScript with ESM syntax but the only available browser build is a CJS blob which completely defeats the main touted benefit of static imports/exports, namely dead code elimination...
So you decide what the hell, let's switch TSC to ESM and moduleResolution node16, and end up having to use something like https://github.com/antongolub/tsc-esm-fix because the only allowed fix for TSC doing the wrong thing is at the completely wrong level - https://www.typescriptlang.org/docs/handbook/esm-node.html - if you don't see what's wrong with that, you're one of today's lucky 10000...
-
There (kind of) is another option. It is called Rescript. But to be honest will probably never take off... :(
-
Klotho
AWS Cloud-aware infrastructure-from-code toolbox [NEW]. Build cloud backends with Infrastructure-from-Code (IfC), a revolutionary technique for generating and updating cloud infrastructure. Try IfC with AWS and Klotho now (Now open-source)
Related posts
- Slack Next-gen Platform - The Simplest "Hello World"
- Scripting with VSCode Tasks and Typescript
- React intellisense alternating between "x={}" and "y", have posted on their github but not getting a fix :(
- Feature request - inline type aliases
- Setup a modern Jamstack project using Gatsby, TypeScript, Styled Components, and Contentful!