Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
@fp-tx/documenter
Advanced tools
Documenter is a lightweight markdown file generator for fp-tx libraries similar to docs-ts
which creates markdown files by parsing the .api.json
file generated by @microsoft/api-extractor
.
Documenter is limited currently to creating files for each namespace export from a single entrypoint. Support for differing library schemes will be explored in the future.
Tag Name | Tag Type | Example | Parent Tag | Notes |
---|---|---|---|---|
@remarks | Native block tag | |||
@deprecated | Native block tag | |||
@example | Native block tag | Requires code fences and language specifier | ||
@public | Native modifier tag | Also: @beta and @alpha | ||
@meta | Custom block tag | @meta | A block tag which is used to group the custom tags used by documenter | |
@since | Custom inline tag | {@since 0.1.0} | @meta | Used to indicate when this export was added |
@category | Custom inline tag` | {@category Models} | @meta | Used to group similar exports |
@deprecationSchedule | Custom inline tag | {@deprecationSchedule 0.2.0} | @meta | Used to indicate the version in which this export will be deprecated |
@removalSchedule | Custom inline tag | {@removalSchedule 0.3.0} | @meta | Used to indicate the version in which this export will be removed |
@license | Custom inline tag | {@license MIT – Copyright (c) 2024-present Jacob Alford} | @meta | Used to indicate that this export is licensed under a particular copyright |
/**
* Fetches a user by their id
*
* @remarks
* This function is deprecated and will be removed in the next major version. Please use
* `fetchUserById` instead.
* @deprecated
* @example
*
* ```typescript
* import * as RTE from 'fp-ts/ReaderTaskEither'
* import { FetchService, FetchError, User } from './types'
*
* const fetchUser123 = fetchUser('123')
* ```
*
* @public
* @meta
* {@since 0.1.0}
* {@category Effects}
* {@deprecationSchedule 0.2.0}
* {@removalSchedule 0.3.0}
* {@license MIT – Copyright (c) 2024-present Jacob Alford}
*/
export declare const fetchUser: (
userId: string,
) => RTE.ReaderTaskEither<FetchService, FetchError, User>
Note: Documenter expects prettier as a peer dependency, and is used for formatting type signatures generated by the library.
pnpm add -D @fp-tx/documenter
npm i @fp-tx/documenter --save-dev
yarn add -D @fp-tx/documenter
Documenter can be invoked using npx
or by adding a script to your package.json
(replacing pnpm
with your package manager of choice).
{
"scripts": {
"docs:extract": "api-extractor run --local --verbose",
"docs:pack": "fp-tx-documenter -i ./temp/mylib.api.json -o ./docs",
"docs": "pnpm run build && pnpm run docs:extract && pnpm run docs:pack"
}
}
fp-tx-documenter --help
-i, --input
- The input JSON file generated by @microsoft/api-extractor
.-o, --output
- The output directory for the generated markdown files.FAQs
Custom markdown generation using api-extractor
The npm package @fp-tx/documenter receives a total of 17 weekly downloads. As such, @fp-tx/documenter popularity was classified as not popular.
We found that @fp-tx/documenter demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.