Skip to content

Conversation

@ssttevee
Copy link

Description

Export the actual value of Query instead of just the type declaration so it can be used with instanceof.

Motivation and context

I need to distinguish and handle Querys separately from other values.

To achieve this right now, I make an alias like this, which doesn't work well with typescript:

const Query = fql([]).constructor;

How was the change tested?

Screenshots (if appropriate):

Change types

    • Bug fix (non-breaking change that fixes an issue)
    • New feature (non-breaking change that adds functionality)
    • Breaking change (backwards-incompatible fix or feature)

Checklist:

    • My code follows the code style of this project.
    • My change requires a change to Fauna documentation.
    • My change requires a change to the README, and I have updated it accordingly.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ssttevee ssttevee requested a review from a team as a code owner February 25, 2025 18:15
Copy link
Contributor

@ptpaterson ptpaterson left a comment

Choose a reason for hiding this comment

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

Thanks @ssttevee! I agree marking Query as only a type was probably a mistake.

@ptpaterson ptpaterson enabled auto-merge (squash) February 25, 2025 18:48
@ssttevee
Copy link
Author

@ptpaterson is there something blocking the workflows from running?

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