feat: improve TypeScript type definitions with optional parameters#665
Merged
Conversation
- Convert required configuration fields to optional in JsMindRuntimeOptions - Add support for 'visible' value in node_overflow option - Update type definitions to match official documentation examples - Enhance test coverage for optional parameters and new type features - Improve API flexibility by making most options optional except container - Update JSDoc comments to reflect optional parameter changes
hizzgdev
reviewed
Aug 15, 2025
…lementation
- Update direction parameter JSDoc in add_node, insert_node_before, insert_node_after, move_node functions
- Add support for numeric strings ('-1', '0', '1') and numbers (-1, 0, 1) in addition to string values
- Document that Direction.of() function supports multiple input types as shown in jsmind.common.js
- Improve API documentation accuracy and developer experience
hizzgdev
approved these changes
Aug 15, 2025
Owner
|
Thanks! @UmbraCi |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR improves the TypeScript type definitions for jsMind by making most configuration options optional, which provides better developer experience and matches the actual usage patterns shown in the official documentation.
Changes Made
Type Definition Improvements
New Type Support
Documentation & Testing
Benefits
Breaking Changes
Testing
Related Issues
This addresses the need for more flexible TypeScript type definitions that better represent the actual API usage patterns.
Checklist