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

fix: forgot type in constructor for some geometry classes #231

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

welpie21
Copy link
Contributor

Thank you for submitting this pull request! We appreciate you spending the time to work on these changes.

What is the motivation?

When I was reading the code I noticed a few forgotten types that were checked with instanceof inside the constructor.

What does this change do?

Make sure it accepts the missing type as an argument.

What is your testing strategy?

Before the change when you instantiated a new GeometryCollection with the given argument of another GeometryCollection instance that already exists. The error that typescript gives is:
Argument of type 'GeometryCollection' is not assignable to parameter of type '[Geometry, ...Geometry[]]'

After the change the argument accepts a other GeometryCollection class.

The following classes had the same forgotten type issue:

  • GeometryMultiLine
  • GeometryMultiPolygon
  • GeometryCollection

Is this related to any issues?

There are no related issues.

Have you read the Contributing Guidelines?

@welpie21 welpie21 requested a review from kearfy as a code owner April 18, 2024 21:15
@kearfy kearfy merged commit 92b3590 into surrealdb:main Apr 18, 2024
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.

None yet

2 participants