Socket
Socket
Sign inDemoInstall

@fp-tx/documenter

Package Overview
Dependencies
5
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fp-tx/documenter

Custom markdown generation using api-extractor


Version published
Maintainers
1
Install size
24.3 MB
Created

Readme

Source

documenter-banner

documenter

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.

Disclaimer

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.

Supported TSDoc Tags

Tag NameTag TypeExampleParent TagNotes
@remarksNative block tag
@deprecatedNative block tag
@exampleNative block tagRequires code fences and language specifier
@publicNative modifier tagAlso: @beta and @alpha
@metaCustom block tag@metaA block tag which is used to group the custom tags used by documenter
@sinceCustom inline tag{@since 0.1.0}@metaUsed to indicate when this export was added
@categoryCustom inline tag`{@category Models}@metaUsed to group similar exports
@deprecationScheduleCustom inline tag{@deprecationSchedule 0.2.0}@metaUsed to indicate the version in which this export will be deprecated
@removalScheduleCustom inline tag{@removalSchedule 0.3.0}@metaUsed to indicate the version in which this export will be removed
@licenseCustom inline tag{@license MIT – Copyright (c) 2024-present Jacob Alford}@metaUsed to indicate that this export is licensed under a particular copyright

TSDoc Tag Example

/**
 * 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>

Installation

Note: Documenter expects prettier as a peer dependency, and is used for formatting type signatures generated by the library.

PNPM

pnpm add -D @fp-tx/documenter

NPM

npm i @fp-tx/documenter --save-dev

Yarn

yarn add -D @fp-tx/documenter

Usage

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"
  }
}

CLI Options

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.

Keywords

FAQs

Last updated on 18 Mar 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc