Skip to content

Commit d265d0b

Browse files
committed
docs: add reproduction example
1 parent c31284b commit d265d0b

File tree

6 files changed

+301
-0
lines changed

6 files changed

+301
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,5 @@ fabric.properties
7575

7676
# Editor-based Rest Client
7777
.idea/httpRequests
78+
79+
pnpm-lock.yaml

examples/basic/package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "example-basic",
3+
"type": "module",
4+
"scripts": {
5+
"start": "node dist/index.js",
6+
"build": "tsc",
7+
"prepare": "ts-patch install -s && pnpm build"
8+
},
9+
"packageManager": "pnpm@10.12.4",
10+
"devDependencies": {
11+
"ts-patch": "^3.3.0",
12+
"typescript": "^5.9.2",
13+
"typescript-transform-paths": "^3.5.5"
14+
}
15+
}

examples/basic/pnpm-lock.yaml

Lines changed: 223 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/basic/src/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { greet } from "#utils/greet.js";
2+
3+
console.log(greet("World"));

examples/basic/src/utils/greet.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export function greet(name: string) {
2+
return `Hello ${name}!`;
3+
}

examples/basic/tsconfig.json

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
// Visit https://aka.ms/tsconfig to read more about this file
3+
"compilerOptions": {
4+
// File Layout
5+
"rootDir": "./src",
6+
"outDir": "./dist",
7+
8+
// Environment Settings
9+
// See also https://aka.ms/tsconfig/module
10+
"module": "nodenext",
11+
"target": "esnext",
12+
"types": [],
13+
// For nodejs:
14+
// "lib": ["esnext"],
15+
// "types": ["node"],
16+
// and npm install -D @types/node
17+
18+
// Other Outputs
19+
"sourceMap": true,
20+
"declaration": true,
21+
"declarationMap": true,
22+
23+
// Stricter Typechecking Options
24+
"noUncheckedIndexedAccess": true,
25+
"exactOptionalPropertyTypes": true,
26+
27+
// Style Options
28+
// "noImplicitReturns": true,
29+
// "noImplicitOverride": true,
30+
// "noUnusedLocals": true,
31+
// "noUnusedParameters": true,
32+
// "noFallthroughCasesInSwitch": true,
33+
// "noPropertyAccessFromIndexSignature": true,
34+
35+
// Recommended Options
36+
"strict": true,
37+
"jsx": "react-jsx",
38+
"verbatimModuleSyntax": true,
39+
"isolatedModules": true,
40+
"noUncheckedSideEffectImports": true,
41+
"moduleDetection": "force",
42+
"skipLibCheck": true,
43+
44+
// Add Plugin
45+
"plugins": [
46+
{ "transform": "typescript-transform-paths", "useRootDirs": true },
47+
{ "transform": "typescript-transform-paths", "useRootDirs": true, "afterDeclarations": true }
48+
],
49+
// Configure paths
50+
"baseUrl": ".",
51+
"paths": {
52+
"#utils/*.js": ["./src/utils/*.js"]
53+
}
54+
}
55+
}

0 commit comments

Comments
 (0)