-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat: add JSDoc example #8533
Draft
linonetwo
wants to merge
19
commits into
TiddlyWiki:master
Choose a base branch
from
linonetwo:feat/ast-type
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
feat: add JSDoc example #8533
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
602e5ea
feat: add example
linonetwo 270aeba
chore: add ts file so tsc --noEmit works
linonetwo 492d812
refactor: remove // @ts-check
linonetwo ac308e0
feat: Allow `import('$:/core/modules/...')` instead of `import('../..…
linonetwo b6f219a
feat: make $tw.wiki globally available
linonetwo a5feb38
feat: add an example jsdoc to $tw.wiki.getTiddlerText
linonetwo c5304b4
fix: Declaration emit for this file requires using private name 'Widg…
linonetwo 43eff4e
fix: duplication of types
linonetwo cdceedd
docs: shorten JSDoc comment as requsted
linonetwo 8f0d37e
refactor: move some type to base class
linonetwo 24279cc
feat: allow type in /generated to work
linonetwo e3fc9b4
feat: import base type
linonetwo 18517b6
refactor: generate types to /types/core instead for simplicity
linonetwo c56afea
feat: add ast type that wikiast is using
linonetwo 06204b1
feat: refine the ast type
linonetwo 0c92f1b
Update tw.d.ts
linonetwo 562a308
fix: ignore base file
linonetwo 3cc1849
Update wiki.js
linonetwo 2eaadcd
Update npm-publish.sh
linonetwo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO the type text should be as short as possible, but still understandable. Your definition contains "undefined", which is not returned. So I would suggest:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When add
@returns
, it means it always return, so can't removeundefined
here. It is same in TypeScript.