arktypea
arktype11mo ago
Micha

Is there a way to preserve jsdoc in arktype?

I have this piece of code:

/**
 * Defines a {@link https://docs.fauna.com/fauna/current/learn/security/roles/#user-defined-role | user-defined role}. A role determines an authentication secret’s privileges, which control data access.
 *
 * Fauna stores user-defined roles as documents in the `Role` system collection. See {@link https://docs.fauna.com/fauna/current/reference/fql-api/auth/role/ | Role}.
 */
const role = type({
    /**
     * Assigns the role to tokens based on the {@link https://docs.fauna.com/fauna/current/learn/security/tokens/ | token’s} identity document. See for more information on {@link https://fauna.com/docs/reference/javascript#membership-roles | Membership definition}.
     */
    "membership?": "string",
    /**
     * Allows one or more actions on a resource. See {@link https://docs.fauna.com/fauna/current/reference/fsl/role/#privileges-definition | Privileges definition}.
     */
    "privileges?": "string",
});

export type Role = typeof role;


At the moment the TS type Role don't have JsDoc as part of Intellisense. Also, role has only the overall jsdoc, but not for the key membership & privileges
Was this page helpful?