You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found it very discouraging, that TypeScript is currently fragmented into 2 languages. The 1st one is TypeScript itself and 2nd is TypeScript+declaration files. The program, valid in the 1st language, is not valid in the 2nd. This means, the TypeScript is a superset of TypeScript+declarations.
You can express more logic in TypeScript, however the TypeScript+declarations is a standard for distributing code (to avoid recompilation of the source files).
Despite being a well-known issue, this fragmentation is not documented anywhere, and TS development team does provide any feedback about it. It is a hushed up thing, nobody wants to talk about this.
This issue should at least be described in details, on the documentation website.
The text was updated successfully, but these errors were encountered:
The solution is simple - a design decision should be made, that *.d.ts files should create exactly the same internal compilation data, as regular source files. For that, probably a different format of the declaration files is needed, *.d2.ts
Its very discouraging, when you have to spent hours, mingling your code (that compiles just fine in TypeScript), reducing type-safety, to make it work in the TypeScript+declarations language. In certain cases its not possible at all.
Hello,
I found it very discouraging, that TypeScript is currently fragmented into 2 languages. The 1st one is
TypeScript
itself and 2nd isTypeScript+declaration files
. The program, valid in the 1st language, is not valid in the 2nd. This means, theTypeScript
is a superset ofTypeScript+declarations
.You can express more logic in
TypeScript
, however theTypeScript+declarations
is a standard for distributing code (to avoid recompilation of the source files).Despite being a well-known issue, this fragmentation is not documented anywhere, and TS development team does provide any feedback about it. It is a hushed up thing, nobody wants to talk about this.
This issue should at least be described in details, on the documentation website.
The text was updated successfully, but these errors were encountered: