Skip to content

TypeScript #273

Description

@avin-kavish

As the title says, I'd like to have typescript snippets and async/await in js/ts.

Activity

  1. avin-kavish commented on Jun 24, 2022

    @avin-kavish
    Author

    I'm realising there's a limitation here that prevents proper typing of the return type in TypeScript examples.

    I.e.:

    interface Body { ... }
    
    const res = await fetch('...', { ... })
    const body = await res.json<Body>()

    Ideally, this would be the ts example, but the HARRequest passed to HTTPSnippet doesn't contain return type information. Although, the context in which these snippets are used, OpenAPI specs, do have return type annotations.

  2. changed the title [-]Typescript support. Async/Await syntax.[/-] [+]TypeScript[/+] on Jul 13, 2022
  3. locked and limited conversation to collaborators on Jul 13, 2022
  4. converted this issue into a discussion #281 on Jul 13, 2022
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions