Skip to content

Commit 3613196

Browse files
authored
chore: use TypeScript Go (#393)
1 parent 0107c30 commit 3613196

File tree

4 files changed

+28
-5
lines changed

4 files changed

+28
-5
lines changed

astro.config.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import svelte from "@astrojs/svelte";
22
import { defineConfig } from "astro/config";
33
import { optimizeCss, optimizeImports } from "carbon-preprocess-svelte";
4+
import path from "node:path";
45
import pkg from "./package.json" assert { type: "json" };
56

67
export default defineConfig({
@@ -19,6 +20,14 @@ export default defineConfig({
1920
},
2021
vite: {
2122
plugins: [optimizeCss()],
23+
resolve: {
24+
alias: {
25+
"@www": path.resolve("./www"),
26+
"@layouts": path.resolve("./www/layouts"),
27+
"@components": path.resolve("./www/components"),
28+
"svelte-highlight": path.resolve("./src"),
29+
},
30+
},
2231
optimizeDeps: {
2332
exclude: ["carbon-components-svelte"],
2433
},

bun.lock

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"@types/bun": "^1.3.3",
1616
"@types/jest": "^30.0.0",
1717
"@types/node": "^24.10.1",
18+
"@typescript/native-preview": "^7.0.0-dev.20251122.1",
1819
"astro": "^4.16.19",
1920
"carbon-components-svelte": "0.93.0",
2021
"carbon-preprocess-svelte": "0.11.14",
@@ -26,7 +27,6 @@
2627
"postcss-merge-rules": "^7.0.7",
2728
"svelte": "^4.2.20",
2829
"svelte-focus-key": "latest",
29-
"typescript": "^5.9.3",
3030
"vite": "^5.4.21",
3131
},
3232
},
@@ -340,6 +340,22 @@
340340

341341
"@types/yargs-parser": ["@types/yargs-parser@21.0.3", "", {}, "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ=="],
342342

343+
"@typescript/native-preview": ["@typescript/native-preview@7.0.0-dev.20251122.1", "", { "optionalDependencies": { "@typescript/native-preview-darwin-arm64": "7.0.0-dev.20251122.1", "@typescript/native-preview-darwin-x64": "7.0.0-dev.20251122.1", "@typescript/native-preview-linux-arm": "7.0.0-dev.20251122.1", "@typescript/native-preview-linux-arm64": "7.0.0-dev.20251122.1", "@typescript/native-preview-linux-x64": "7.0.0-dev.20251122.1", "@typescript/native-preview-win32-arm64": "7.0.0-dev.20251122.1", "@typescript/native-preview-win32-x64": "7.0.0-dev.20251122.1" }, "bin": { "tsgo": "bin/tsgo.js" } }, "sha512-5JofzSZ1T6WnmRCUMtteMAyAaIcvQMNKlJfSkleJTHuCSUn0pxGUG64CMt0KNVVtuOgCIPscqg4tfr90PuH+Ww=="],
344+
345+
"@typescript/native-preview-darwin-arm64": ["@typescript/native-preview-darwin-arm64@7.0.0-dev.20251122.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-RReunypvb+gvDYLlR63+LeCVf4u+njjeDzTjkUscEdloZ3BVbrMnXfxp64fj8lXt8vzGjhCvwd9P3+rXjOLZeg=="],
346+
347+
"@typescript/native-preview-darwin-x64": ["@typescript/native-preview-darwin-x64@7.0.0-dev.20251122.1", "", { "os": "darwin", "cpu": "x64" }, "sha512-+IPttsQAp0gxbMnuL/mvU6QkjP9tSCbaSEwXXBwIGh1/SZTuikEmHSq4ZJVr3Q3jJ0kj50WIywwpWVFh6T2QLw=="],
348+
349+
"@typescript/native-preview-linux-arm": ["@typescript/native-preview-linux-arm@7.0.0-dev.20251122.1", "", { "os": "linux", "cpu": "arm" }, "sha512-gLfCZmSFpg+32/JbpZNfMbd7SBCDzXc/h0I/2lqvAQD+C090kIDV/xJKBQIa/SM1XeAurMQgcyxNWuAh++A8Yw=="],
350+
351+
"@typescript/native-preview-linux-arm64": ["@typescript/native-preview-linux-arm64@7.0.0-dev.20251122.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-uSS0gs3o/hzSTqG5czhyEUSmfq+C5xhejkePW3cb7w2OWBK2saPZWhSeqfnJkgMhKrLd87d76LqRG9+BXqpSSQ=="],
352+
353+
"@typescript/native-preview-linux-x64": ["@typescript/native-preview-linux-x64@7.0.0-dev.20251122.1", "", { "os": "linux", "cpu": "x64" }, "sha512-MyAd9qcFvaSC2I4GGYfwbpdn1PYoQqeWXfpBkUejnkAws0aFRBITCfCwfIBWd9lcE7pHgYa+9vB0UeJegXGPng=="],
354+
355+
"@typescript/native-preview-win32-arm64": ["@typescript/native-preview-win32-arm64@7.0.0-dev.20251122.1", "", { "os": "win32", "cpu": "arm64" }, "sha512-0eXxif0zA36nymY2C7YWGdJKxj+FK4u8f0pblX++6vRTmO41UDrHERvd549ur4E17m3w1j6YiuFG0/kOQeZLpQ=="],
356+
357+
"@typescript/native-preview-win32-x64": ["@typescript/native-preview-win32-x64@7.0.0-dev.20251122.1", "", { "os": "win32", "cpu": "x64" }, "sha512-2AnG7WhjZ5Jv3mu+8cNR4JRe3mJg8ODOBnejbA1uGYJ00EDYFfmX87s9Q9eUywEmsEGabraQfnH7+YTyCBiGsQ=="],
358+
343359
"@ungap/structured-clone": ["@ungap/structured-clone@1.3.0", "", {}, "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g=="],
344360

345361
"acorn": ["acorn@8.14.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA=="],

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"package": "bun scripts/npm-package.ts",
1414
"test:unit": "bun test tests/*.ts",
1515
"test:e2e": "bunx playwright test",
16-
"test:types": "bunx tsc",
16+
"test:types": "tsgo",
1717
"format": "biome format --write .",
1818
"format:check": "biome format .",
1919
"lint": "biome lint .",
@@ -35,6 +35,7 @@
3535
"@types/bun": "^1.3.3",
3636
"@types/jest": "^30.0.0",
3737
"@types/node": "^24.10.1",
38+
"@typescript/native-preview": "^7.0.0-dev.20251122.1",
3839
"astro": "^4.16.19",
3940
"carbon-components-svelte": "0.93.0",
4041
"carbon-preprocess-svelte": "0.11.14",
@@ -46,7 +47,6 @@
4647
"postcss-merge-rules": "^7.0.7",
4748
"svelte": "^4.2.20",
4849
"svelte-focus-key": "latest",
49-
"typescript": "^5.9.3",
5050
"vite": "^5.4.21"
5151
},
5252
"repository": {

tsconfig.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
{
22
"extends": "astro/tsconfigs/strictest",
33
"compilerOptions": {
4-
"baseUrl": ".",
54
"noEmit": true,
65
"checkJs": true,
7-
"ignoreDeprecations": "5.0",
86
"allowSyntheticDefaultImports": true,
97
"resolveJsonModule": true,
108
"paths": {

0 commit comments

Comments
 (0)