Skip to content

JSDoc generated by infer-from-usage codefix should be sorted #28090

Open
@sandersn

Description

@sandersn
/** 
 * @param {number} y
 * @return {number}
 * */
function f(x,y,z) {
  return x * y * z
}

Expected behavior:
Infer from usage sorts JSDoc after adding new inferences:

/**
 * @param {number} x
 * @param {number} y
 * @param {number} z
 * @return {number}
 */
function f(x,y,z) {
  return x * y * z
}

Actual behavior:

/**
 * @param {number} y
 * @return {number}
 * @param {number} x
 * @param {number} z
 */
function f(x,y,z) {
  return x * y * z
}

Note that #27978 doesn't fix this problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: JavaScriptThe issue relates to JavaScript specifically

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions