Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScript support #7

Closed
Risbot opened this issue Apr 5, 2018 · 2 comments
Closed

TypeScript support #7

Risbot opened this issue Apr 5, 2018 · 2 comments
Labels

Comments

@Risbot
Copy link

Risbot commented Apr 5, 2018

Do you will have plan to support typescript?

@jaydenseric
Copy link
Owner

There are no plans to adopt TypeScript for this project, here is a rationale: jaydenseric/graphql-react#6 (comment).

@jaydenseric jaydenseric changed the title Typescript support TypeScript support Jan 14, 2022
@jaydenseric
Copy link
Owner

This situation has changed considerably since 2018, now it's possible to support TypeScript (cutting-edge versions at least) via TypeScript flavoured JSDoc comments within .mjs ESM modules. For both authoring and consuming my packages, here are some goals moving forwards:

  • Standard ESM. Published modules universally run in Node.js, Deno, and browsers.
  • Zero builds. The code we write is the code that runs. People can optionally "optimize" modules in their projects if they so choose (e.g. via CDNs that minify on the fly), but it shouldn't be a requirement to reasonably efficiently run the code.
  • Type safety. Package code is type checked in GitHub Actions CI, and high quality types are automatically available to consumers of the packages in their projects without additional work such as installing type definitions or annotating imports with @deno-types comments.
  • Highest quality intellisense. All public exports have detailed JSDoc descriptions and rich content such as examples and links to other relevant parts of the API using JSDoc @link, @linkcode, @see, and @example tags.

Unfortunately, using the TypeScript flavour of JSDoc means the API docs in the readme can no longer be automatically generated using jsdoc-md, so for now these docs will be written by hand. Hopefully In the future Deno doc will support import maps (see denoland/docland#85) and then our readme for each exported module will just need to link to the module docs at https://doc.deno.land .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants