Skip to content

Output of rescript-tools doc includes shadowed bindings #7495

Closed
@mediremi

Description

@mediremi

If a module has shadowed bindings

let foo = (a: int, b: string) => ()

let foo = () => foo(1, "")

the output of rescript-tools doc will include the shadowed binding

{
  "name": "Foo",
  "docstrings": [],
  "source": {
    "filepath": "js/Foo.res",
    "line": 1,
    "col": 1
  },
  "items": [
  {
    "id": "Foo.foo",
    "kind": "value",
    "name": "foo",
    "signature": "let foo: (int, string) => unit",
    "docstrings": [],
    "source": {
      "filepath": "js/Foo.res",
      "line": 1,
      "col": 5
    },
    "detail": 
    {
      "kind": "signature",
      "details": {
      "parameters": [{
          "path": "int"
        }, {
          "path": "string"
        }],
      "returnType": {
        "path": "unit"
      }
    }
    }
  }, 
  {
    "id": "Foo.foo",
    "kind": "value",
    "name": "foo",
    "signature": "let foo: unit => unit",
    "docstrings": [],
    "source": {
      "filepath": "js/Foo.res",
      "line": 3,
      "col": 5
    },
    "detail": 
    {
      "kind": "signature",
      "details": {
      "parameters": [{
          "path": "unit"
        }],
      "returnType": {
        "path": "unit"
      }
    }
    }
  }]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions