Skip to content

Commit fc03252

Browse files
committed
Update docs
1 parent 08abc22 commit fc03252

File tree

91 files changed

+834
-185
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+834
-185
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[Home](./index) > [@microsoft/node-core-library](./node-core-library.md) > [MapExtensions](./node-core-library.mapextensions.md)
2+
3+
# MapExtensions class
4+
5+
Helper functions for working with the Map<K,V> data type.
6+
7+
## Methods
8+
9+
| Method | Access Modifier | Returns | Description |
10+
| --- | --- | --- | --- |
11+
| [`mergeFromMap(targetMap, sourceMap)`](./node-core-library.mapextensions.mergefrommap.md) | | `void` | Adds all the (key, value) pairs from the source map into the target map. |
12+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[Home](./index) > [@microsoft/node-core-library](./node-core-library.md) > [MapExtensions](./node-core-library.mapextensions.md) > [mergeFromMap](./node-core-library.mapextensions.mergefrommap.md)
2+
3+
# MapExtensions.mergeFromMap method
4+
5+
Adds all the (key, value) pairs from the source map into the target map.
6+
7+
**Signature:**
8+
```javascript
9+
static mergeFromMap<K, V>(targetMap: Map<K, V>, sourceMap: Map<K, V>): void;
10+
```
11+
**Returns:** `void`
12+
13+
## Remarks
14+
15+
This function modifies targetMap. Any existing keys will be overwritten.
16+
17+
## Parameters
18+
19+
| Parameter | Type | Description |
20+
| --- | --- | --- |
21+
| `targetMap` | `Map<K, V>` | The map that entries will be added to |
22+
| `sourceMap` | `Map<K, V>` | The map containing the entries to be added |
23+

api/node-core-library.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Core libraries that every NodeJS toolchain project should use.
1212
| [`JsonFile`](./node-core-library.jsonfile.md) | Utilities for reading/writing JSON files. |
1313
| [`JsonSchema`](./node-core-library.jsonschema.md) | Represents a JSON schema that can be used to validate JSON data files loaded by the JsonFile class. |
1414
| [`LockFile`](./node-core-library.lockfile.md) | A helper utility for working with file-based locks. This class should only be used for locking resources across processes, but should not be used for attempting to lock a resource in the same process. |
15+
| [`MapExtensions`](./node-core-library.mapextensions.md) | Helper functions for working with the Map&lt;K,V&gt; data type. |
1516
| [`PackageJsonLookup`](./node-core-library.packagejsonlookup.md) | This class provides methods for finding the nearest "package.json" for a folder and retrieving the name of the package. The results are cached. |
1617
| [`PackageName`](./node-core-library.packagename.md) | Various functions for working with package names that may include scopes. |
1718
| [`Path`](./node-core-library.path.md) | Common operations for manipulating file and directory paths. |

api/node-core-library.packagename.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ Various functions for working with package names that may include scopes.
1414
| [`isValidName(packageName)`](./node-core-library.packagename.isvalidname.md) | | `boolean` | Returns true if the specified package name is valid, or false otherwise. |
1515
| [`parse(packageName)`](./node-core-library.packagename.parse.md) | | `IParsedPackageName` | Same as [PackageName.tryParse](./node-core-library.packagename.tryparse.md)<!-- -->, except this throws an exception if the input cannot be parsed |
1616
| [`tryParse(packageName)`](./node-core-library.packagename.tryparse.md) | | `IParsedPackageNameOrError` | This attempts to parse a package name that may include a scope component. |
17+
| [`validate(packageName)`](./node-core-library.packagename.validate.md) | | `void` | Throws an exception if the specified name is not a valid package name. |
1718

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[Home](./index) &gt; [@microsoft/node-core-library](./node-core-library.md) &gt; [PackageName](./node-core-library.packagename.md) &gt; [validate](./node-core-library.packagename.validate.md)
2+
3+
# PackageName.validate method
4+
5+
Throws an exception if the specified name is not a valid package name.
6+
7+
**Signature:**
8+
```javascript
9+
static validate(packageName: string): void;
10+
```
11+
**Returns:** `void`
12+
13+
## Parameters
14+
15+
| Parameter | Type | Description |
16+
| --- | --- | --- |
17+
| `packageName` | `string` | |
18+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[Home](./index) &gt; [@microsoft/ts-command-line](./ts-command-line.md) &gt; [CommandLineAction](./ts-command-line.commandlineaction.md) &gt; [actionName](./ts-command-line.commandlineaction.actionname.md)
2+
3+
# CommandLineAction.actionName property
4+
5+
The name of the action. For example, if the tool is called "example", then the "build" action might be invoked as: "example build -q --some-other-option"
6+
7+
**Signature:**
8+
```javascript
9+
actionName: string
10+
```
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[Home](./index) &gt; [@microsoft/ts-command-line](./ts-command-line.md) &gt; [CommandLineAction](./ts-command-line.commandlineaction.md) &gt; [documentation](./ts-command-line.commandlineaction.documentation.md)
2+
3+
# CommandLineAction.documentation property
4+
5+
A detailed description that is shown on the action help page, which is displayed by the command "example build --help", e.g. for actionName="build".
6+
7+
**Signature:**
8+
```javascript
9+
documentation: string
10+
```

api/ts-command-line.commandlineaction.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,15 @@ Represents a sub-command that is part of the CommandLineParser command line. App
88

99
| Property | Access Modifier | Type | Description |
1010
| --- | --- | --- | --- |
11-
| [`options`](./ts-command-line.commandlineaction.options.md) | | `ICommandLineActionOptions` | The options that were passed to the constructor. |
11+
| [`actionName`](./ts-command-line.commandlineaction.actionname.md) | | `string` | The name of the action. For example, if the tool is called "example", then the "build" action might be invoked as: "example build -q --some-other-option" |
12+
| [`documentation`](./ts-command-line.commandlineaction.documentation.md) | | `string` | A detailed description that is shown on the action help page, which is displayed by the command "example build --help", e.g. for actionName="build". |
13+
| [`summary`](./ts-command-line.commandlineaction.summary.md) | | `string` | A quick summary that is shown on the main help page, which is displayed by the command "example --help" |
1214

1315
## Methods
1416

1517
| Method | Access Modifier | Returns | Description |
1618
| --- | --- | --- | --- |
1719
| [`constructor(options)`](./ts-command-line.commandlineaction.constructor.md) | | | Constructs a new instance of the [CommandLineAction](./ts-command-line.commandlineaction.md) class |
20+
| [`onDefineParameters()`](./ts-command-line.commandlineaction.ondefineparameters.md) | `protected` | `void` | The child class should implement this hook to define its command-line parameters, e.g. by calling defineFlagParameter(). |
1821
| [`onExecute()`](./ts-command-line.commandlineaction.onexecute.md) | `protected` | `Promise<void>` | Your subclass should implement this hook to perform the operation. |
1922

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[Home](./index) &gt; [@microsoft/ts-command-line](./ts-command-line.md) &gt; [CommandLineAction](./ts-command-line.commandlineaction.md) &gt; [onDefineParameters](./ts-command-line.commandlineaction.ondefineparameters.md)
2+
3+
# CommandLineAction.onDefineParameters method
4+
5+
The child class should implement this hook to define its command-line parameters, e.g. by calling defineFlagParameter().
6+
7+
**Signature:**
8+
```javascript
9+
protected abstract onDefineParameters(): void;
10+
```
11+
**Returns:** `void`
12+

api/ts-command-line.commandlineaction.options.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)