Skip to content

Show signature help for contextual callback #25265

Closed

Description

TypeScript Version: 2.9.2 and 3.0.0-dev.20180626

Search Terms:
jsx props intellisense

Code

import Table from 'antd/lib/table'
//...
render() {
  return (
    <Table.Column render={(){/*<- cursor between braces*/}}/>
  )
}

Expected behavior:

Expected is that intellisense for the inserted brace of an arrow gives correct param types.

node_modules\antd\lib\table\interface.d.ts
render?: (text: any, record: T, index: number) => React.ReactNode;

image

Actual behavior:

image

Playground Link:

https://github.com/ackvf/typescript-repro/tree/render-prop

Related Issues:
#25266

Activity

  1. ghost added
    Needs More InfoThe issue still hasn't been fully clarified
    on Jul 4, 2018
  2. ackvf commented on Jul 4, 2018

    @ackvf
    Author

    Yes Andy (Andrewkraft) (@Andy-MS) , I guess the expected and exhibited behavior in your example is the same.
    When you invoke the intellisense inside the brace foo({/*here*/}) it does provide a hint render: (n: number) => void, but not when invoked inside the render as in your example.

  3. ghost removed this from the TypeScript 3.0.1 milestone on Jul 10, 2018
  4. ghost added this to the TypeScript 3.1 milestone on Jul 10, 2018
  5. ghost removed
    Needs More InfoThe issue still hasn't been fully clarified
    on Jul 20, 2018
  6. ghost removed
    BugA bug in TypeScript
    on Jul 20, 2018
  7. ghost added
    SuggestionAn idea for TypeScript
    on Jul 20, 2018
  8. ghost added
    Domain: LS: Signature HelpInformation in editor tooltips when invoking a function call
    on Jul 20, 2018
  9. ghost changed the title [-]Wrong prop intellisense in JSX[/-] [+]Show signature help for contextual callback[/+] on Jul 20, 2018
  10. ghost closed this as completedin #26022on Aug 6, 2018
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

    Domain: LS: Signature HelpInformation in editor tooltips when invoking a function callSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions