You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/index.ts
+47-4Lines changed: 47 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -5,15 +5,21 @@ import type { AsyncAPIObject } from './spec-types';
5
5
6
6
/**
7
7
*
8
-
* @param {string[]} files Array of stringified AsyncAPI documents in YAML format, that are to be bundled (or array of filepaths, resolved and passed via `Array.map()` and `fs.readFileSync`, which is the same, see `README.md`).
8
+
* @param {string[]} files Array of stringified AsyncAPI documents in YAML
9
+
* format, that are to be bundled (or array of filepaths, resolved and passed
10
+
* via `Array.map()` and `fs.readFileSync`, which is the same, see `README.md`).
9
11
* @param {Object} [options]
10
-
* @param {string | object} [options.base] Base object whose properties will be retained.
11
-
* @param {boolean} [options.referenceIntoComponents] Pass `true` to resolve external references to components.
12
+
* @param {string | object} [options.base] Base object whose properties will be
13
+
* retained.
14
+
* @param {boolean} [options.referenceIntoComponents] Pass `true` to resolve
15
+
* external references to components.
12
16
*
13
17
* @return {Document}
14
18
*
15
19
* @example
16
20
*
21
+
* **TypeScript**
22
+
* ```ts
17
23
* import { readFileSync, writeFileSync } from 'fs';
18
24
* import bundle from '@asyncapi/bundler';
19
25
*
@@ -27,6 +33,41 @@ import type { AsyncAPIObject } from './spec-types';
0 commit comments