Home Reference Source

Function

Static Public Summary
public

Generates a Provider with an already defined name for the program.

Static Public

public cliWithName(name: string): Provider source

Generates a Provider with an already defined name for the program.

Params:

NameTypeAttributeDescription
name string

The name of the program.

Return:

Provider

Example:

// Generate the provider
const provider = cliWithName('my-program');
// Register it on the container
container.register(provider);
// Getting access to the service instance
const cli = container.get('cli');