clojure / clojure/clojurescript-site
Mention `^js` annotation in Externs Guide
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 107
- Forks
- 130
- PR merge metrics
- No merged PRs in 30d
Description
The externs guide mentions type annotations like ^js/Foo.Bar.
Although it doesn't mention it, it's also possible to simply use ^js. (In fact anything like ^js/asdf will work, too.)
Should ^js be the default recommendation? Oftentimes you don't know the correct type of JS objects you're getting back from an NPM lib. Even if you do, using a generic annotation seems to have the same effect, so not sure there are any downsides to simply using ^js everywhere.
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 externs guide's “externs inference” section, especially its discussion of ^js/Foo.Bar annotations. Verify how the simpler ^js annotation is described and whether it should be the default recommendation; done means the guide clearly documents the supported form and recommendation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100