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: Allow TSAsExpression for useFunctions #4229

Merged

Conversation

Wimpert
Copy link
Contributor

@Wimpert Wimpert commented May 15, 2023

Overview

What is it?

  • Feature / enhancement
  • Bug
  • Docs / tests / types / typos

Description

The lint plugin does not accept TSAsExpression as a parent of useFunctions

`export const HelloWorld = component$(async () => {
          const test = useFunction() as string;
  });

NOTE

There seems to be a typing issues, not 100% sure what do to with this ...

Type '"TSAsExpression"' is not comparable to type '"ArrayExpression" | "ArrayPattern" | "ArrowFunctionExpression" | "AssignmentExpression" | "AssignmentPattern" | "AwaitExpression" | "BinaryExpression" | "BlockStatement" | ... 62 more ... | "YieldExpression"'
image

Use cases and why

    1. One use case
    1. Another use case

Checklist:

  • My code follows the developer guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • Added new tests to cover the fix / functionality

@stackblitz
Copy link

stackblitz bot commented May 15, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@Wimpert Wimpert force-pushed the Allow_TSAsExpression_for_use-function branch from 136e629 to b91f9a1 Compare May 15, 2023 15:39
@Wimpert Wimpert changed the title Allow ts as expression for use function fix: Allow TSAsExpression for useFunctions May 15, 2023
@Wimpert Wimpert marked this pull request as ready for review May 16, 2023 08:07
@manucorporat manucorporat merged commit 3caabe6 into QwikDev:main May 17, 2023
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