doc: use code snippet for typescript examples (#880)

The typescript code is in a fully function file, that will be run via the CI.
This commit is contained in:
Lei Xu
2024-01-27 22:52:37 -08:00
committed by Weston Pace
parent 545a03d7f9
commit d811b89de2
12 changed files with 281 additions and 49 deletions

17
docs/tsconfig.json Normal file
View File

@@ -0,0 +1,17 @@
{
"include": [
"src/*.ts",
],
"compilerOptions": {
"target": "es2022",
"module": "nodenext",
"declaration": true,
"outDir": "./dist",
"strict": true,
"allowJs": true,
"resolveJsonModule": true,
},
"exclude": [
"./dist/*",
]
}