@openload28/tt-lang 1.0.0-dev.20260901.304 → 1.0.0-dev.20260903.321
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -7
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -24,15 +24,14 @@ looks. The TT installer does not add it for you:
|
|
|
24
24
|
bun add -d @openload28/tt-lang@next typescript@7.1.0-dev.20260826.1
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
works on 7.0. See the
|
|
27
|
+
Content mappers use APIs that arrived in TypeScript 7.1; everything else works
|
|
28
|
+
on 7.0. See the
|
|
30
29
|
[installation guide](https://github.com/load28/tt/blob/main/docs/getting-started.md).
|
|
31
30
|
|
|
32
31
|
```sh
|
|
33
32
|
bunx ttc -o build src/ # compile a source tree to TypeScript
|
|
34
33
|
bunx ttc --check src/ # check without writing anything
|
|
35
|
-
bunx ttc --types src/
|
|
34
|
+
bunx ttc --check-types src/ # check tt and TypeScript
|
|
36
35
|
```
|
|
37
36
|
|
|
38
37
|
On TypeScript 7.1+, `.ts` files can import `.tt` directly — this package
|
|
@@ -41,11 +40,22 @@ virtually (no sidecar files). Declare it once in `tsconfig.json` and run
|
|
|
41
40
|
`tsc` with `--runExternalCode`:
|
|
42
41
|
|
|
43
42
|
```jsonc
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
{
|
|
44
|
+
"compilerOptions": { "strict": true, "noEmit": true },
|
|
45
|
+
"contentMappers": [
|
|
46
|
+
{ "package": "@openload28/tt-lang", "extensions": [".tt", ".ttx"] }
|
|
47
|
+
],
|
|
48
|
+
"include": ["src"]
|
|
49
|
+
}
|
|
47
50
|
```
|
|
48
51
|
|
|
52
|
+
```sh
|
|
53
|
+
bunx tsc -p tsconfig.json --runExternalCode
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Use `ttc --types` sidecars only for legacy TypeScript hosts that cannot load a
|
|
57
|
+
content mapper.
|
|
58
|
+
|
|
49
59
|
Using a bundler? [`@openload28/unplugin-tt`](https://github.com/load28/tt/tree/main/integrations/unplugin)
|
|
50
60
|
reads `.tt` files directly in Vite, Rollup, webpack, Rspack, esbuild and
|
|
51
61
|
Farm, and finds this package's binary automatically.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openload28/tt-lang",
|
|
3
|
-
"version": "1.0.0-dev.
|
|
3
|
+
"version": "1.0.0-dev.20260903.321",
|
|
4
4
|
"description": "tt — a tiny TypeScript preprocessor adding Rust-style variants, match expressions, try, let-else, if let and the pipeline operator. Installs the ttc compiler.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
"node": ">=18"
|
|
48
48
|
},
|
|
49
49
|
"optionalDependencies": {
|
|
50
|
-
"@openload28/tt-lang-linux-x64": "1.0.0-dev.
|
|
51
|
-
"@openload28/tt-lang-linux-arm64": "1.0.0-dev.
|
|
52
|
-
"@openload28/tt-lang-darwin-x64": "1.0.0-dev.
|
|
53
|
-
"@openload28/tt-lang-darwin-arm64": "1.0.0-dev.
|
|
54
|
-
"@openload28/tt-lang-win32-x64-msvc": "1.0.0-dev.
|
|
50
|
+
"@openload28/tt-lang-linux-x64": "1.0.0-dev.20260903.321",
|
|
51
|
+
"@openload28/tt-lang-linux-arm64": "1.0.0-dev.20260903.321",
|
|
52
|
+
"@openload28/tt-lang-darwin-x64": "1.0.0-dev.20260903.321",
|
|
53
|
+
"@openload28/tt-lang-darwin-arm64": "1.0.0-dev.20260903.321",
|
|
54
|
+
"@openload28/tt-lang-win32-x64-msvc": "1.0.0-dev.20260903.321"
|
|
55
55
|
}
|
|
56
56
|
}
|