Skip to content

Commit b0942a6

Browse files
committed
docs: update comments
1 parent 8d26e11 commit b0942a6

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/types.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import type { ModuleDeclaration, Project, SourceFile } from "ts-morph";
22

3-
/** `ExtractPackageApiOptions` contains all the options for calling {@link extractPackageApi}. */
3+
/** `ExtractPackageApiOptions` contains the options for calling {@link extractPackageApi}. */
44
export interface ExtractPackageApiOptions {
55
/**
66
Package to extract the API from.
77
8-
This can be either a package name (e.g., `foo`) or any other query
9-
that can be passed to `bun add` (e.g., `foo@1.0.0`).
8+
This can be either a package name (e.g., `foo`, `@foo/bar`) or
9+
any other query that can be passed to `bun add` (e.g., `foo@1.0.0`).
1010
1111
@see {@link https://bun.sh/docs/cli/add | Bun docs}
1212
*/
@@ -80,6 +80,7 @@ export interface PackageApi {
8080
8181
@example
8282
```ts
83+
// Installing `foo` brings in also `bar` and `baz` as dependencies.
8384
["foo@1.0.0", "bar@2.0.0", "baz@3.0.0"]
8485
```
8586
*/
@@ -92,24 +93,23 @@ export interface PackageApi {
9293
analyzedIn: number;
9394
}
9495

95-
/** `ExtractDeclarationsOptions` contains all the options for calling {@link extractDeclarations}. */
96+
/** `ExtractDeclarationsOptions` contains the options for calling {@link extractDeclarations}. */
9697
export interface ExtractDeclarationsOptions {
98+
/** Container that exports the top-level declarations. */
99+
container: SourceFile | ModuleDeclaration;
100+
97101
/**
98-
Name of the container that contains the top-level declarations (e.g., the name of a namespace).
99-
This is used to generate declaration IDs.
102+
Container name (e.g., the name of a namespace), used to generate declaration IDs.
100103
*/
101104
containerName: string;
102105

103-
/** Container that contains the top-level declarations. */
104-
container: SourceFile | ModuleDeclaration;
105-
106106
/** Maximum extraction depth for nested namespaces. */
107107
maxDepth: number;
108108

109-
/** Instance of a `ts-morph` `Project`. This is used to find ambient modules. */
109+
/** Instance of a `ts-morph` `Project`, used to find ambient modules. */
110110
project?: Project;
111111

112-
/** Name of the package being analyzed. This is used to filter ambient modules. */
112+
/** Name of the package being analyzed, used to filter ambient modules. */
113113
pkgName?: string;
114114
}
115115

@@ -118,7 +118,7 @@ export interface BaseDeclaration {
118118
/** Unique ID. */
119119
id: string;
120120

121-
/** Export name. */
121+
/** Export name (may differ from the original name). */
122122
name: string;
123123

124124
/** List of associated JSDoc comments. */

0 commit comments

Comments
 (0)