mdn / mdn/fred

Expose types and a nicer entrypoint for renderSimplified

Open
#1,404 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
233
Forks
61
Avg merge
1d 1h
Merged PRs (30d)
82

Description

In https://github.com/mdn/mcp/pull/114 we're able to use the renderSimplified function instead of rolling our own, however:

  • We still have to import it from the out directory, not great, we should have a top level exposed through package.json
  • We don't expose any types with it

I remember dabbling in exposing types in our npm package in the past, and it being less than trivial. IIRC we can't rip our inline jsdoc types into a d.ts for shipping without some tsconfig changes which break things?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating renderSimplified and the package.json export configuration, then inspect the existing tsconfig settings related to generated declarations. Compare how the function is currently imported from the out directory and determine what package entrypoint and shipped types are needed; done means consumers can import it from the package top level with usable types without breaking the current build.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.