Skip to content
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: Added default value to Canvas constructor #3094

Merged
merged 1 commit into from
Jun 11, 2024

Conversation

Autsider666
Copy link
Contributor

The combined type for the constructor property has no required fields. This way you don't have to add an empty object to the superclass's constructor when, for example, creating a Canvas subclass

The combined type for the constructor property has no required fields. This way you don't have to add an empty object to the superclass's constructor when, for example, creating a Canvas subclass
@Autsider666
Copy link
Contributor Author

Making height and width required could potentially be an even better option if the warning in the docs is to be believed, but I'm sure there are people that are able to do some magic this way by working around it.

Copy link
Member

@eonarheim eonarheim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Autsider666 Good find! Many thanks

@eonarheim eonarheim merged commit c76d4fe into excaliburjs:main Jun 11, 2024
5 checks passed
@Autsider666 Autsider666 deleted the patch-1 branch July 18, 2024 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants