Skip to content

Commit 38a6948

Browse files
committed
docs: include non-exported types in the docs
1 parent b095b73 commit 38a6948

File tree

7 files changed

+37
-25
lines changed

7 files changed

+37
-25
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
"typedoc-plugin-include-example": "^2.0.2",
6363
"typedoc-plugin-inline-sources": "^1.2.0",
6464
"typedoc-plugin-mdn-links": "^4.0.7",
65+
"typedoc-plugin-missing-exports": "^3.1.0",
6566
"typescript": "~4.9.5",
6667
"which": "^5.0.0"
6768
},

pnpm-lock.yaml

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

src/compat.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -734,15 +734,18 @@ for (const key in shortOptions) {
734734

735735
/**
736736
* Create a new socket.
737-
*
737+
*
738738
* @param type Type of socket to create.
739739
* @param options Options for the socket.
740-
*
740+
*
741741
* @returns A new socket.
742-
*
742+
*
743743
* @includeExample examples/v5-compat/index.js
744744
*/
745-
export function createSocket(type: SocketType, options: {[key: string]: any} = {}) {
745+
export function createSocket(
746+
type: SocketType,
747+
options: {[key: string]: any} = {},
748+
) {
746749
const sock = new Socket(type)
747750
for (const key in options) {
748751
if (options.hasOwnProperty(key)) {
@@ -805,10 +808,7 @@ export function proxy(frontend: Socket, backend: Socket, capture?: Socket) {
805808

806809
export const version = zmq.version
807810

808-
export {
809-
createSocket as socket,
810-
shortOptions as options,
811-
}
811+
export {createSocket as socket, shortOptions as options}
812812

813813
export * from "./compat/long-options"
814814
export * from "./compat/types"

src/index.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,7 @@ allowMethods(Pair.prototype, ["send", "receive"])
982982
* water mark for a connected {@link Subscriber}, then any messages that would
983983
* be sent to the subscriber in question shall instead be dropped until the mute
984984
* state ends. The {@link Writable.send}() method will never block.
985-
*
985+
*
986986
* @includeExample examples/pub-sub/publisher.ts
987987
*/
988988
export class Publisher extends Socket {
@@ -1032,7 +1032,7 @@ allowMethods(Publisher.prototype, ["send"])
10321032
* {@link Publisher}. Initially a {@link Subscriber} is not subscribed to any
10331033
* messages. Use {@link Subscriber.subscribe}() to specify which messages to
10341034
* subscribe to. This socket cannot send messages.
1035-
*
1035+
*
10361036
* @includeExample examples/pub-sub/subscriber.ts
10371037
*/
10381038
export class Subscriber extends Socket {
@@ -1139,7 +1139,7 @@ allowMethods(Subscriber.prototype, ["receive"])
11391139
* If no services are available, then any send operation on the socket shall
11401140
* block until at least one service becomes available. The REQ socket shall not
11411141
* discard messages.
1142-
*
1142+
*
11431143
* @includeExample examples/req-rep/client.ts
11441144
*/
11451145
export class Request extends Socket {
@@ -1207,7 +1207,7 @@ allowMethods(Request.prototype, ["send", "receive"])
12071207
* among all clients, and each reply sent is routed to the client that issued
12081208
* the last request. If the original requester does not exist any more the reply
12091209
* is silently discarded.
1210-
*
1210+
*
12111211
* @includeExample examples/req-rep/server.ts
12121212
*/
12131213
export class Reply extends Socket {
@@ -1240,7 +1240,7 @@ allowMethods(Reply.prototype, ["send", "receive"])
12401240
* When a {@link Dealer} is connected to a {@link Reply} socket, each message
12411241
* sent must consist of an empty message part, the delimiter, followed by one or
12421242
* more body parts.
1243-
*
1243+
*
12441244
* @includeExample examples/queue/index.ts
12451245
* @includeExample examples/queue/queue.ts
12461246
*/
@@ -1386,7 +1386,7 @@ allowMethods(Router.prototype, ["send", "receive"])
13861386
* A {@link Pull} socket is used by a pipeline node to receive messages from
13871387
* upstream pipeline nodes. Messages are fair-queued from among all connected
13881388
* upstream nodes. This socket cannot send messages.
1389-
*
1389+
*
13901390
* @includeExample examples/push-pull/worker.ts
13911391
*/
13921392
export class Pull extends Socket {
@@ -1419,7 +1419,7 @@ allowMethods(Pull.prototype, ["receive"])
14191419
* at all, then {@link Writable.send}() will block until the mute state ends or
14201420
* at least one downstream node becomes available for sending; messages are not
14211421
* discarded.
1422-
*
1422+
*
14231423
* @includeExample examples/push-pull/producer.ts
14241424
*/
14251425
export class Push extends Socket {

src/native.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -685,8 +685,11 @@ export const enum SocketType {
685685

686686
/* Utility types. */
687687

688-
/* https://stackoverflow.com/questions/49579094 */
689-
type IfEquals<X, Y, A, B = never> =
688+
/**
689+
* @internal
690+
* https://stackoverflow.com/questions/49579094
691+
*/
692+
export type IfEquals<X, Y, A, B = never> =
690693
(<T>() => T extends X ? 1 : 2) extends <T>() => T extends Y ? 1 : 2 ? A : B
691694

692695
/**

src/util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ type SocketMethods = "send" | "receive" | "join" | "leave"
66
* to make the relevant socket types have only their relevant methods.
77
* @param socketPrototype
88
* @param methods
9-
*
9+
*
1010
* @internal
1111
*/
1212
export function allowMethods(socketPrototype: any, methods: SocketMethods[]) {

typedoc.json

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,7 @@
66
"out": "docs-unminified",
77
"excludePrivate": true,
88
"excludeExternals": false,
9-
"exclude": [
10-
"script/**/*",
11-
"test/**/*",
12-
"examples/**/*",
13-
"build/**/*"
14-
],
9+
"exclude": ["script/**/*", "test/**/*", "examples/**/*", "build/**/*"],
1510
"highlightLanguages": [
1611
"bash",
1712
"console",
@@ -31,6 +26,7 @@
3126
"plugin": [
3227
"typedoc-plugin-dt-links",
3328
"typedoc-plugin-mdn-links",
34-
"typedoc-plugin-include-example"
29+
"typedoc-plugin-include-example",
30+
"typedoc-plugin-missing-exports"
3531
]
3632
}

0 commit comments

Comments
 (0)