generated from mizdra/npm-package-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from mizdra/improve-api-documentation
Improve API documentation
- Loading branch information
Showing
32 changed files
with
5,268 additions
and
11,618 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -134,3 +134,5 @@ dist | |
|
||
# User | ||
/dist | ||
/tsdoc-metadata.json | ||
/temp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
/dist | ||
/tsdoc-metadata.json | ||
/temp | ||
/docs/api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", | ||
"mainEntryPointFilePath": "<projectFolder>/dist/index.d.ts", | ||
"apiReport": { | ||
"enabled": false | ||
}, | ||
"docModel": { | ||
"enabled": true, | ||
"apiJsonFilePath": "<projectFolder>/temp/<unscopedPackageName>.api.json" | ||
}, | ||
"dtsRollup": { | ||
"enabled": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) | ||
|
||
## API Reference | ||
|
||
## Packages | ||
|
||
| Package | Description | | ||
| --- | --- | | ||
| [@mizdra/inline-fixture-files](./inline-fixture-files.md) | The utility for writing fixture files inline. | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@mizdra/inline-fixture-files](./inline-fixture-files.md) > [AddFixturesResult](./inline-fixture-files.addfixturesresult.md) | ||
|
||
## AddFixturesResult interface | ||
|
||
The return of [CreateIFFResult.addFixtures()](./inline-fixture-files.createiffresult.addfixtures.md)<!-- -->. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
export interface AddFixturesResult<T extends Directory, U extends Directory> | ||
``` | ||
|
||
## Properties | ||
|
||
| Property | Modifiers | Type | Description | | ||
| --- | --- | --- | --- | | ||
| [paths](./inline-fixture-files.addfixturesresult.paths.md) | | FlattenDirectory<T> & FlattenDirectory<U> | The paths to fixtures created with [createIFF()](./inline-fixture-files.createiff.md) and added with [CreateIFFResult.addFixtures()](./inline-fixture-files.createiffresult.addfixtures.md)<!-- -->. See [CreateIFFResult.paths](./inline-fixture-files.createiffresult.paths.md) for details. | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@mizdra/inline-fixture-files](./inline-fixture-files.md) > [AddFixturesResult](./inline-fixture-files.addfixturesresult.md) > [paths](./inline-fixture-files.addfixturesresult.paths.md) | ||
|
||
## AddFixturesResult.paths property | ||
|
||
The paths to fixtures created with [createIFF()](./inline-fixture-files.createiff.md) and added with [CreateIFFResult.addFixtures()](./inline-fixture-files.createiffresult.addfixtures.md)<!-- -->. See [CreateIFFResult.paths](./inline-fixture-files.createiffresult.paths.md) for details. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
paths: FlattenDirectory<T> & FlattenDirectory<U>; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@mizdra/inline-fixture-files](./inline-fixture-files.md) > [createIFF](./inline-fixture-files.createiff.md) | ||
|
||
## createIFF() function | ||
|
||
Create fixtures in the specified directory. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
export declare function createIFF<const T extends Directory>(directory: T, options: CreateIFFOptions): Promise<CreateIFFResult<T>>; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| directory | T | The definition of fixtures to be created. | | ||
| options | [CreateIFFOptions](./inline-fixture-files.createiffoptions.md) | Options for creating fixtures. | | ||
|
||
**Returns:** | ||
|
||
Promise<[CreateIFFResult](./inline-fixture-files.createiffresult.md)<!-- --><T>> | ||
|
||
An object that provides functions to manipulate the fixtures. | ||
|
||
## Remarks | ||
|
||
The path must be in POSIX-style (`'dir/file.txt'`<!-- -->). Use of Windows-style path (`'dir\\file.txt'`<!-- -->) is an undefined behavior. | ||
|
||
## Example | ||
|
||
|
||
```ts | ||
const iff = await createIFF( | ||
{ | ||
'a.txt': 'a', | ||
'b': { | ||
'a.txt': 'b-a', | ||
}, | ||
'c/a/a.txt': 'c-a-a', | ||
}, fixturesDir); | ||
expect(await readFile(join(fixturesDir, 'a.txt'), 'utf-8')).toBe('a'); | ||
expect(await readFile(join(fixturesDir, 'b/a.txt'), 'utf-8')).toBe('b-a'); | ||
expect(await readFile(join(fixturesDir, 'c/a/a.txt'), 'utf-8')).toBe('c-a-a'); | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@mizdra/inline-fixture-files](./inline-fixture-files.md) > [CreateIFFOptions](./inline-fixture-files.createiffoptions.md) | ||
|
||
## CreateIFFOptions interface | ||
|
||
The options for [createIFF()](./inline-fixture-files.createiff.md)<!-- -->. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
export interface CreateIFFOptions | ||
``` | ||
|
||
## Properties | ||
|
||
| Property | Modifiers | Type | Description | | ||
| --- | --- | --- | --- | | ||
| [rootDir](./inline-fixture-files.createiffoptions.rootdir.md) | | string | Root directory for fixtures. | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@mizdra/inline-fixture-files](./inline-fixture-files.md) > [CreateIFFOptions](./inline-fixture-files.createiffoptions.md) > [rootDir](./inline-fixture-files.createiffoptions.rootdir.md) | ||
|
||
## CreateIFFOptions.rootDir property | ||
|
||
Root directory for fixtures. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
rootDir: string; | ||
``` |
Oops, something went wrong.