TypeScript #281
Replies: 2 comments 1 reply
-
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. |
Beta Was this translation helpful? Give feedback.
-
@dimitropoulos you moved this discussion, but you haven't said anything. :P So what do you think about adding TypeScript? I mean, I could ask why isn't TypeScript already an option, considering you have written the library in ts? |
Beta Was this translation helpful? Give feedback.
-
As the title says, I'd like to have typescript snippets and async/await in js/ts.
Beta Was this translation helpful? Give feedback.
All reactions