-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
convert Docsify and mixins to ES classes #1685
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/docsify-core/docsify-preview/27q5MnU4eLdPxqqJaJxKKvN8uFHm |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 5e0f68c:
|
I had to run the test three times for them to pass. That's a bit annoying. |
this is good to go |
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.
I think It makes Docsify more readable with ES upgrade.
LGTM.
Btw, if you turn on "hide whitespace" in the "files changed" tab, the diff is easier to see. Not too many actual changes besides whitespace indentation. |
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.
If it doesn't affect previous users, it's fine.
LGTM.
Yep yep! Let's keep as much backwards compatibility as possible. The new Solid-SSR stuff will be compatible with v4 |
Summary
Converts Docsify and its internal mixins to ES classes. The advantage is static typing: this change begins to allow IDEs like VS Code to know the shape of classes for type checking and intellisense, so devs can go-to-definition on methods, or see if they are passing the wrong data type (still needs work, but this is a first step).
Docsify-classes.mp4
What kind of change does this PR introduce?
Refactor
For any code change,
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing applications:
Related issue, if any:
Tested in the following browsers: