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

chore(react): refactor generate-react-exports #725

Merged
merged 8 commits into from
Oct 27, 2023
Merged

Conversation

AykutSarac
Copy link
Member

@AykutSarac AykutSarac commented Oct 1, 2023

  • Simplifies the logic of generate-react-exports.js as types are inferred, removing the need of generics
  • Simplifies the React export making it more readable
/**
 * @tag bl-textarea
 * @summary Baklava Textarea component
 */
export const BlTextarea = React.lazy(() =>
  customElements.whenDefined("bl-textarea").then(() => ({
    default: createComponent({
      react: React,
      displayName: "BlTextarea",
      tagName: "bl-textarea",
      elementClass: customElements.get("bl-textarea") as Constructor<BlTextarea>,
      events: {
        onBlInput: "bl-input" as EventName<BlTextareaInput>,
        onBlChange: "bl-change" as EventName<BlTextareaChange>,
        onBlInvalid: "bl-invalid" as EventName<BlTextareaInvalid>,
      },
    }),
  }))
);

@AykutSarac AykutSarac changed the title chore(react): improve react types & typescript check chore(react): refactor generate-react-exports Oct 2, 2023
@AykutSarac AykutSarac requested a review from muratcorlu October 2, 2023 09:17
@AykutSarac
Copy link
Member Author

@ts-nocheck may be removed after #727 resolved.

@AykutSarac AykutSarac requested a review from Enes5519 October 2, 2023 16:23
@AykutSarac AykutSarac requested a review from Enes5519 October 18, 2023 06:13
@AykutSarac AykutSarac merged commit 43b5208 into next Oct 27, 2023
@AykutSarac AykutSarac deleted the chore/ts-react branch October 27, 2023 12:50
Copy link

github-actions bot commented Nov 2, 2023

🎉 This PR is included in version 2.4.0-beta.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

This was referenced Jan 25, 2024
Copy link

🎉 This PR is included in version 3.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants