Socket
Socket
Sign inDemoInstall

@withfig/api-bindings

Package Overview
Dependencies
14
Maintainers
7
Versions
197
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @withfig/api-bindings

The Typescript definitions for the Fig API.


Version published
Weekly downloads
854
increased by76.45%
Maintainers
7
Created
Weekly downloads
 

Readme

Source

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.

FAQs

Last updated on 24 Jan 2024

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc