Skip to content

Commit b7645ad

Browse files
committed
Add Docs
1 parent 89d9c09 commit b7645ad

File tree

6 files changed

+123
-7
lines changed

6 files changed

+123
-7
lines changed

.github/workflows/doc.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches: ["master"]
6+
workflow_dispatch:
7+
8+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
15+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
16+
concurrency:
17+
group: "pages"
18+
cancel-in-progress: false
19+
20+
jobs:
21+
deploy:
22+
environment:
23+
name: github-pages
24+
url: ${{ steps.deployment.outputs.page_url }}
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v3
29+
- name: Setup Pages
30+
uses: actions/configure-pages@v3
31+
- uses: actions/setup-node@v3
32+
with:
33+
node-version: 18
34+
registry-url: https://registry.npmjs.org/
35+
- name: npm install
36+
run: npm install
37+
- name: npm run doc
38+
run: npm run doc
39+
- name: Upload artifact
40+
uses: actions/upload-pages-artifact@v1
41+
with:
42+
path: './docs/'
43+
- name: Deploy to GitHub Pages
44+
id: deployment
45+
uses: actions/deploy-pages@v2
46+

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
docs/
2+
13
# Logs
24
logs
35
*.log

generic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import Pool from './lib/pool.js';
1212

1313
export * from './lib/postgis.js'
1414

15-
export function Param(param) {
15+
export function Param<T>(param?: T): T | null {
1616
if (param === undefined) {
1717
return null;
1818
} else {

package-lock.json

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

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"types": "./generic.ts",
88
"scripts": {
99
"lint": "eslint generic.ts lib/**.ts",
10+
"doc": "typedoc",
1011
"build": "tsc --build"
1112
},
1213
"repository": {
@@ -40,6 +41,7 @@
4041
"pg-structure": "^7.15.0",
4142
"postgres": "^3.4.3",
4243
"turbo": "^1.11.3",
44+
"typedoc": "^0.25.8",
4345
"wkx": "^0.5.0"
4446
}
4547
}

tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"strict": true,
77
"skipLibCheck": true,
88
"module": "es2022",
9-
"esModuleInterop": true,
109
"target": "es2022",
10+
"esModuleInterop": true,
1111
"noImplicitAny": false,
1212
"moduleResolution": "node",
1313
"sourceMap": true,
@@ -21,6 +21,6 @@
2121
},
2222
"include": [
2323
"generic.ts",
24-
"lib/**/*"
24+
"lib/*.ts"
2525
]
2626
}

0 commit comments

Comments
 (0)