@withfig/api-bindings
TypeScript icon, indicating that this package has built-in type declarations

0.30.5 • Public • Published

TS API Bindings

The Typescript definitions for the Fig API.

Note: The protobuf definitions are updated automatically whenever withfig/proto-api is changed.

Documenting the API

We use TSDocs to comment the exported namespaces of the API.

See docs-generators/fig-api folder in public-site-nextjs repo for reference.

Supported TSDoc tags and custom TSDoc tags

  • @param: The params of an exported function, the format MUST be @param <name of the param> <some description>. It can be provided multiple times for different params.
    /**
     * @param notification some description for the notification param
     */
    export function subscribe(notification) { }
  • @returns: An explanation of what is returned by an exported function.
  • @remarks: Further details about the implementation of the method, use cases...etc. This data will appear in the Discussion section.
  • @example: Provide examples about the usage of the API object. It is repeatable.
  • @prop: Provide a description for one property of the exported object, the format MUST be @prop <name of the property> - <some description>. It can be provided multiple times for different properties.
    /**
     * @prop subscribe - a description
     * @prop unsubscribe - a description
     */
    export const didChange = {
      subscribe: (notification) => { },
      unsubscribe: (notification) => { }
    } 
  • @excluded: To exclude some symbol from the docs. It should not be used.
  • @deprecated: Mark an API as deprecated providing an optional message about the deprecation.
    /**
     * @deprecated This message is optional
     */
    export const didChange = {
      subscribe: (notification) => { },
    } 

What will appear in the documentation?

Our API bindings export a list of named namespace objects each one exporting a group of Symbols. In our docs file we document each of the exported symbols grouped according to their namespace.

Publishing

This package will be published automatically when pushed to any branch of this repo.

Readme

Keywords

none

Package Sidebar

Install

npm i @withfig/api-bindings

Weekly Downloads

484

Version

0.30.5

License

MIT

Unpacked Size

2.85 MB

Total Files

171

Last publish

Collaborators

  • separaterecords
  • grant0417
  • fedeci
  • mschrage
  • sullivan-sean
  • brendanfalk
  • cstrnt-fig