Skip to content

Commit

Permalink
Merge pull request #549 from zeromq/docs [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya authored Dec 7, 2022
2 parents 1e17ee3 + 8730be2 commit 31a6de4
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 92 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"shx": "^0.3.4"
},
"devDependencies": {
"@gnd/typedoc": "^0.15.0-0",
"@types/chai": "^4.3.4",
"@types/fs-extra": "^9.0.13",
"@types/mocha": "^10.0.0",
Expand All @@ -51,6 +50,7 @@
"rocha": "^2.5.10",
"semver": "^7.3.8",
"ts-node": "~10.9.1",
"typedoc": "^0.23.21",
"typescript": "~4.9.3",
"weak-napi": "^2.0.2",
"which": "^3.0.0"
Expand Down Expand Up @@ -84,7 +84,7 @@
"build.library": "tsc -p ./src/tsconfig.json && run-s build.library.compat",
"build.script": "tsc -p ./script/tsconfig.json",
"build.js": "run-p build.script build.library",
"build.doc": "typedoc --options ./typedoc.json --tsconfig ./tsconfig.docs.json && minify-all -s docs-raw -d docs --jsCompressor terser",
"build.doc": "typedoc --options ./typedoc.json && minify-all -s docs-raw -d docs --jsCompressor terser",
"deploy.doc": "run-s build.doc && gh-pages --dist \"./docs\"",
"prebuild": "run-s build.js && node ./script/prebuild.js",
"build.native": "node-gyp configure --release && node-gyp build --release",
Expand Down
106 changes: 31 additions & 75 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ function asyncIterator<T extends SocketLikeIterable<U>, U>(this: T) {
Object.assign(Socket.prototype, {[Symbol.asyncIterator]: asyncIterator})
Object.assign(Observer.prototype, {[Symbol.asyncIterator]: asyncIterator})

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

interface RouterConnectOptions {
export interface RouterConnectOptions {
routingId?: string
}

Expand Down Expand Up @@ -1582,7 +1582,7 @@ export class Stream extends Socket {
}
}

interface StreamConnectOptions {
export interface StreamConnectOptions {
routingId?: string
}

Expand Down
14 changes: 7 additions & 7 deletions src/native.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,11 @@ interface ErrnoError extends Error {
errno: number
}

interface AuthError extends Error {
export interface AuthError extends Error {
status: 300 | 400 | 500
}

interface ProtoError extends Error {
export interface ProtoError extends Error {
code:
| "ERR_ZMTP_UNSPECIFIED"
| "ERR_ZMTP_UNEXPECTED_COMMAND"
Expand All @@ -145,19 +145,19 @@ interface ProtoError extends Error {
| "ERR_ZAP_INVALID_METADATA"
}

interface EventAddress {
export interface EventAddress {
address: string
}

interface EventInterval {
export interface EventInterval {
interval: number
}

interface EventError<E = ErrnoError> {
export interface EventError<E = ErrnoError> {
error: E
}

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

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

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

/** @internal */
export type ReadableKeys<T> = {
Expand Down
9 changes: 8 additions & 1 deletion tsconfig.docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,12 @@
"./src/index.ts"
]
}
}
},
"exclude": [
"script/**/*",
"test/**/*",
"examples/**/*",
"src/errors.ts",
"src/util.ts"
]
}
6 changes: 2 additions & 4 deletions typedoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@
"entryPoints": [
"./src/index.ts"
],
"tsconfig": " ./tsconfig.docs.json",
"tsconfig": "./tsconfig.docs.json",
"out": "docs-raw",
"excludePrivate": true,
"excludeNotExported": true,
"excludeExternals": true,
"excludeExternals": false,
"exclude": [
"script/**/*",
"test/**/*",
"examples/**/*",
"src/+(draft|native|compat).ts",
"src/errors.ts",
"src/util.ts"
],
Expand Down

0 comments on commit 31a6de4

Please sign in to comment.