Skip to content

Commit a832279

Browse files
Added key features to TS (#419)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 1cb6ef3 commit a832279

File tree

2 files changed

+118
-2
lines changed

2 files changed

+118
-2
lines changed

TAGS.md

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Tags
2+
3+
This document aims to provide reasoning why `config.json` contains the `"tags"` it contains.
4+
5+
It uses as a basis the JavaScript's [TAGS.md](https://github.com/exercism/javascript/blob/main/TAGS.md) because anything that JavaScript does can be done with TypeScript, being a transpiled language, and adds/modifies with the perks TypeScript brings on top of it.
6+
7+
## Paradigms
8+
9+
- [x] `paradigm/declarative`: mostly popularised by libraries and frameworks such as React, Vue, etc.
10+
- [x] `paradigm/functional`: there is a lot of support for functional programming, including various defactor libraries in the ecosystem providing functional programming patterns.
11+
- [x] `paradigm/imperative`: It retains JavaScript's script and DOM's manipulation imperative programming, but the language design doesn't encourage it.
12+
- [ ] `paradigm/logic`: whilst it is possible to write DSL or patterns that' allow for logic-based programming, JavaScript doesn't inherently support it.
13+
- [x] `paradigm/object_oriented`: becomes a main feature of the language compared to JavaScript, along with static type checking and a rich type system.
14+
15+
## Typing
16+
17+
- [x] `typing/static`: Will check types at compile time for any part of the code which has its types stated.
18+
- [x] `typing/dynamic`: At runtime all TypeScript's type information is stripped. Runtime type checking can also be manually achieved, as well.
19+
- [x] `typing/strong`: TypeScript adds a rich type system, that is checked at compile time if used.
20+
- [x] `typing/weak`: TypeScript allows for explicit (strong) typing, inferred (weak) typing, deferred (computed / conditional) typing, opt-out (using `any`) of typing, and forced run-time (using `unknown`) typing.
21+
22+
## Execution mode
23+
24+
- [x] `execution_mode/compiled`: TypeScript transpilation (transpilation via [`tsc`](https://www.typescriptlang.org/), or stripping types and then compiling using [`@babel/preset-typescript`](https://babeljs.io/docs/en/babel-preset-typescript)) compiles the code to a certain version of JavaScript. This includes in-memory compilation using tools such as [`ts-node`](https://github.com/TypeStrong/ts-node), however due to the in-line nature and REPL like support, it might be considered interpreted.
25+
- [x] `execution_mode/interpreted`: TypeScript _can_ be interpreted Just-In-Time by stripping types, for example using [`@babel/preset-typescript`](https://babeljs.io/docs/en/babel-preset-typescript).
26+
27+
## Platform
28+
29+
- [x] `platform/windows`: popularised by Electron and Node
30+
- [x] `platform/mac`: popularised by Electron and Node
31+
- [x] `platform/linux`: popularised by Electron and Node
32+
- [x] `platform/ios`: popularised by PhoneGap/Cordova, Ionic, React-Native
33+
- [x] `platform/android`: popularised by PhoneGap/Cordova, Ionic, React-Native
34+
- [x] `platform/web`: used in frontend frameworks like Angular
35+
36+
## Runtime
37+
38+
- [ ] `runtime/standalone_executable`: it doesn't. Any executable that exists packages Node, or requires Node or a Browser.
39+
- [x] `runtime/language_specific`: it runs on Node
40+
- [ ] `runtime/clr`: it doesn't
41+
- [ ] `runtime/jvm`: it doesn't
42+
- [ ] `runtime/beam`: it doesn't
43+
- [x] `runtime/wasmtime`: Just like JavaScript, it doesn't natively, but JavaScript can compile to WASM, and thus then run on wastime. It's a bit of a cheat, but probably what people will search for.
44+
45+
## Used for
46+
47+
- [x] `used_for/artificial_intelligence`: popularised by TensorFlow
48+
- [x] `used_for/backends`: popularised by Express
49+
- [x] `used_for/cross_platform_development`: popularised by PhoneGap/Cordova, Ionic, React-Native, Electron and more
50+
- [ ] `used_for/embedded_systems`: It's possible to run the transpiled JavaScript on microcontrollers and IoT platforms, but the low-end nature makes it not a viable, professional, solution. Therefore this is not included.
51+
- [ ] `used_for/financial_systems`: Although it improves in the type safeness department, TypeScript being still JavaScript makes it too slow for fintech.
52+
- [x] `used_for/frontends`: Most TypeScript usage is with Frontend frameworks.
53+
- [x] `used_for/games`: probably one of the most popular replacements for browser-based games.
54+
- [x] `used_for/guis`: same reason as frontends, which is more and more interesting as libraries such as React can now also render to less common/expected displays, such as terminals (and thus be used to build GUIs), not requiring CSS or other ways to provide styling.
55+
- [x] `used_for/mobile`: yep, see platform
56+
- [ ] `used_for/robotics`: it's possible. Things like Johnny-Five help a lot. However, it's not a _go to_ language to provide robotics programming, so it's not included.
57+
- [ ] `used_for/scientific_calculations`: possible, and not uncommon especially for _visualisation_ (for example d3), but not a _go to_ language to do scientific calculations, so it's not included.
58+
- [ ] `used_for/scripts`: You could still transpile your TypeScript files, but is usually not worth the hassle, so is not used for scripting at all compared to JavaScript
59+
- [x] `used_for/web_development`: yes

config.json

+59-2
Original file line numberDiff line numberDiff line change
@@ -1143,6 +1143,63 @@
11431143
]
11441144
},
11451145
"concepts": [],
1146-
"key_features": [],
1147-
"tags": []
1146+
"key_features": [
1147+
{
1148+
"icon": "features-evolving",
1149+
"title": "Evolving",
1150+
"content": "Typescript is a modern and constantly evolving open-source language supported by Microsoft."
1151+
},
1152+
{
1153+
"icon": "features-cross-platform",
1154+
"title": "Widely used",
1155+
"content": "TypeScript is used by many libraries and frameworks, and integrates with JavaScript code as well."
1156+
},
1157+
{
1158+
"icon": "features-strongly-typed",
1159+
"title": "Typed JavaScript",
1160+
"content": "Typescript flexible typing system lets you describe what to expect, supporting gradual adoption."
1161+
},
1162+
{
1163+
"icon": "features-multi-paradigm",
1164+
"title": "Use any programming style",
1165+
"content": "Use prototype-based, object-oriented, functional, or declarative programming styles, and more."
1166+
},
1167+
{
1168+
"icon": "features-packages",
1169+
"title": "Consistently Good Tooling",
1170+
"content": "TS's JavaScript integration is handled by the language itself, enabling its tools and features."
1171+
},
1172+
{
1173+
"icon": "features-generic",
1174+
"title": "Large Community",
1175+
"content": "The large number of users makes it easy to find answers, documentation, and libraries."
1176+
}
1177+
],
1178+
"tags": [
1179+
"paradigm/declarative",
1180+
"paradigm/functional",
1181+
"paradigm/imperative",
1182+
"paradigm/object_oriented",
1183+
"typing/static",
1184+
"typing/dynamic",
1185+
"typing/strong",
1186+
"typing/weak",
1187+
"execution_mode/compiled",
1188+
"platform/windows",
1189+
"platform/mac",
1190+
"platform/linux",
1191+
"platform/ios",
1192+
"platform/android",
1193+
"platform/web",
1194+
"runtime/language_specific",
1195+
"runtime/wasmtime",
1196+
"used_for/artificial_intelligence",
1197+
"used_for/backends",
1198+
"used_for/cross_platform_development",
1199+
"used_for/frontends",
1200+
"used_for/games",
1201+
"used_for/guis",
1202+
"used_for/mobile",
1203+
"used_for/web_development"
1204+
]
11481205
}

0 commit comments

Comments
 (0)