rokucommunity / rokucommunity/brighterscript
Integrate api-extractor and leverage @internal to protect certain functions
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 208
- Forks
- 68
- Avg merge
- 8h 39m
- Merged PRs (30d)
- 39
Description
There are many functions in our typescript source code that are used "internally" in the project, so they are marked as public. However, we don't intend for public consumers to leverage these. Our current options are just public or private. and if we use private but still want to call them then we need to use the indexing pattern myClass['somePrivateFunction'].
Microsoft provides a tool called api-extractor that supports the @internal jsdoc annotation to strip those from our exported type definitions.
Integrate that tool, and do a pass to hide certain functions that we don't intend for public consumption.
This is not technically a breaking change because the functions themselves are still present, so existing code will still work. But their typescript builds will start failing at compile time. Need to think on that, but I think we should do it in v0 anyway.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the TypeScript source and the api-extractor setup documentation linked in the issue, then identify how exported type definitions are currently produced. Integrate api-extractor and mark functions intended only for internal use with @internal; done means those functions remain available at runtime but are omitted from exported type definitions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100