Skip to content

Commit 39bd88d

Browse files
Add Async handler using import example
1 parent 64375d2 commit 39bd88d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

imports/client.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1575,6 +1575,14 @@ export class DeepClient<L extends Link<number> = Link<number>> implements DeepCl
15751575
* @remarks
15761576
* Is able to import CommoJS and ESModule libraries.
15771577
* This is the recommended way to import from libraries in deep handlers
1578+
*
1579+
* @example
1580+
* #### Async handler using import
1581+
* ```
1582+
* async ({deep}) => {
1583+
* const importResult = await deep.import("my-lib-name");
1584+
* }
1585+
* ```
15781586
*/
15791587
async import(path: string) : Promise<any> {
15801588
if (typeof DeepClient.resolveDependency !== 'undefined') {

0 commit comments

Comments
 (0)