Skip to content

Commit

Permalink
docs: update createNatsComponent docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Juan Scolari committed Jun 17, 2022
1 parent 33443fd commit 4bcb606
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion etc/nats-component.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { ILoggerComponent } from '@well-known-components/interfaces';
// Warning: (ae-forgotten-export) The symbol "natsComponent" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "INatsComponent" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
// @public
export function createNatsComponent(components: natsComponent.NeededComponents): Promise<INatsComponent & IBaseComponent>;

// (No @packageDocumentation comment for this package)
Expand Down
5 changes: 5 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ import { connect, NatsConnection } from "nats"
import mitt from "mitt"
import { natsComponent, INatsComponent, NatsEvents, Subscription } from "./types"

/**
* Create a NATS component (https://nats.io/)
* Connect to a NATS node on start(), via the env variable "NATS_URL" or to "localhost:4222" by default
* @public
*/
export async function createNatsComponent(
components: natsComponent.NeededComponents
): Promise<INatsComponent & IBaseComponent> {
Expand Down

0 comments on commit 4bcb606

Please sign in to comment.