Skip to content

Commit 8730be2

Browse files
committed
docs: fix the docs issues
1 parent 1e17ee3 commit 8730be2

File tree

6 files changed

+53
-92
lines changed

6 files changed

+53
-92
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
"shx": "^0.3.4"
2626
},
2727
"devDependencies": {
28-
"@gnd/typedoc": "^0.15.0-0",
2928
"@types/chai": "^4.3.4",
3029
"@types/fs-extra": "^9.0.13",
3130
"@types/mocha": "^10.0.0",
@@ -51,6 +50,7 @@
5150
"rocha": "^2.5.10",
5251
"semver": "^7.3.8",
5352
"ts-node": "~10.9.1",
53+
"typedoc": "^0.23.21",
5454
"typescript": "~4.9.3",
5555
"weak-napi": "^2.0.2",
5656
"which": "^3.0.0"
@@ -84,7 +84,7 @@
8484
"build.library": "tsc -p ./src/tsconfig.json && run-s build.library.compat",
8585
"build.script": "tsc -p ./script/tsconfig.json",
8686
"build.js": "run-p build.script build.library",
87-
"build.doc": "typedoc --options ./typedoc.json --tsconfig ./tsconfig.docs.json && minify-all -s docs-raw -d docs --jsCompressor terser",
87+
"build.doc": "typedoc --options ./typedoc.json && minify-all -s docs-raw -d docs --jsCompressor terser",
8888
"deploy.doc": "run-s build.doc && gh-pages --dist \"./docs\"",
8989
"prebuild": "run-s build.js && node ./script/prebuild.js",
9090
"build.native": "node-gyp configure --release && node-gyp build --release",

pnpm-lock.yaml

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

src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ function asyncIterator<T extends SocketLikeIterable<U>, U>(this: T) {
304304
Object.assign(Socket.prototype, {[Symbol.asyncIterator]: asyncIterator})
305305
Object.assign(Observer.prototype, {[Symbol.asyncIterator]: asyncIterator})
306306

307-
interface EventSubscriber {
307+
export interface EventSubscriber {
308308
/**
309309
* Adds a listener function which will be invoked when the given event type is
310310
* observed. Calling this method will convert the {@link Observer} to **event
@@ -1374,7 +1374,7 @@ export class Router extends Socket {
13741374
}
13751375
}
13761376

1377-
interface RouterConnectOptions {
1377+
export interface RouterConnectOptions {
13781378
routingId?: string
13791379
}
13801380

@@ -1582,7 +1582,7 @@ export class Stream extends Socket {
15821582
}
15831583
}
15841584

1585-
interface StreamConnectOptions {
1585+
export interface StreamConnectOptions {
15861586
routingId?: string
15871587
}
15881588

src/native.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,11 @@ interface ErrnoError extends Error {
117117
errno: number
118118
}
119119

120-
interface AuthError extends Error {
120+
export interface AuthError extends Error {
121121
status: 300 | 400 | 500
122122
}
123123

124-
interface ProtoError extends Error {
124+
export interface ProtoError extends Error {
125125
code:
126126
| "ERR_ZMTP_UNSPECIFIED"
127127
| "ERR_ZMTP_UNEXPECTED_COMMAND"
@@ -145,19 +145,19 @@ interface ProtoError extends Error {
145145
| "ERR_ZAP_INVALID_METADATA"
146146
}
147147

148-
interface EventAddress {
148+
export interface EventAddress {
149149
address: string
150150
}
151151

152-
interface EventInterval {
152+
export interface EventInterval {
153153
interval: number
154154
}
155155

156-
interface EventError<E = ErrnoError> {
156+
export interface EventError<E = ErrnoError> {
157157
error: E
158158
}
159159

160-
type EventFor<T extends string, D = {}> = Expand<{type: T} & D>
160+
export type EventFor<T extends string, D = {}> = Expand<{type: T} & D>
161161

162162
/**
163163
* A union type that represents all possible even types and the associated data.
@@ -630,7 +630,7 @@ type IfEquals<X, Y, A, B = never> = (<T>() => T extends X ? 1 : 2) extends <
630630
: B
631631

632632
/* https://stackoverflow.com/questions/57683303 */
633-
type Expand<T> = T extends infer O ? {[K in keyof O]: O[K]} : never
633+
export type Expand<T> = T extends infer O ? {[K in keyof O]: O[K]} : never
634634

635635
/** @internal */
636636
export type ReadableKeys<T> = {

tsconfig.docs.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,12 @@
77
"./src/index.ts"
88
]
99
}
10-
}
10+
},
11+
"exclude": [
12+
"script/**/*",
13+
"test/**/*",
14+
"examples/**/*",
15+
"src/errors.ts",
16+
"src/util.ts"
17+
]
1118
}

typedoc.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,14 @@
44
"entryPoints": [
55
"./src/index.ts"
66
],
7-
"tsconfig": " ./tsconfig.docs.json",
7+
"tsconfig": "./tsconfig.docs.json",
88
"out": "docs-raw",
99
"excludePrivate": true,
10-
"excludeNotExported": true,
11-
"excludeExternals": true,
10+
"excludeExternals": false,
1211
"exclude": [
1312
"script/**/*",
1413
"test/**/*",
1514
"examples/**/*",
16-
"src/+(draft|native|compat).ts",
1715
"src/errors.ts",
1816
"src/util.ts"
1917
],

0 commit comments

Comments
 (0)