Skip to content

Does not produce valid tsdoc #266

Description

@lonix1

When configuring the plugin with tsdoc: true, the formatter does not convert JSDoc to TSDoc.

Specifically:

  • It does not automatically strip redundant braces with types ({string})
  • It does not automatically insert a hyphen (-)

Config for example below:

tsdoc: true,
jsdocVerticalAlignment: false,

Example input:

/**
 * Test function showing syntax conversion issues.
 * @param {string} userId The identifier of the user
 * @returns {boolean} True if authorized
 */
function checkUser(userId: string): boolean {
  return true;
}

Expected output:

/**
 * Test function showing syntax conversion issues.
 *
 * @param userId - The identifier of the user
 * @returns True if authorized
 */
function checkUser(userId: string): boolean {
  return true;
}

Actual output:

/**
 * Test function showing syntax conversion issues.
 *
 * @param {string} userId The identifier of the user
 * @returns {boolean} True if authorized
 */
function checkUser(userId: string): boolean {
  return true;
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions