glutinum-org / cli

https://glutinum.net/
59 stars 6 forks source link

Support `@link [...](...)` syntax for tsdoc link syntax #88

Open MangelMaxime opened 6 months ago

MangelMaxime commented 6 months ago

TypeScript documentation:

export interface CoreOptions {
    /**
     * Call this function to update the table state.
     * @link [API Docs](https://tanstack.com/table/v8/docs/api/core/table#setstate)
     * @link [Guide](https://tanstack.com/table/v8/docs/guide/tables)
     */
    setState: void;
}

translates into

module rec Glutinum

open Fable.Core
open Fable.Core.JsInterop
open System

[<AllowNullLiteral>]
[<Interface>]
type CoreOptions =
    /// <summary>
    /// Call this function to update the table state.
    /// <see href="https://tanstack.com/table/v8/docs/api/core/table#setstate">API Docs</see>"
    /// <see href="https://tanstack.com/table/v8/docs/guide/tables">Guide</see>"
    /// </summary>
    abstract member setState: unit with get, set

Example of npm package using this features:

TanStack/table