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: add generic props type for NodeData #330

Open
wants to merge 1 commit into
base: v0.1.x
Choose a base branch
from

Commits on Oct 8, 2021

  1. fix: add generic props type for NodeData

    in typescript, we suppose not to use `any`. we can simply add the generic type on Node to make codes better.
    ex.
    ```ts
      const {
        actions: { setProp },
        props,
      } = useNode((node: Node<CraftProgramCollectionProps>) => ({
        props: node.data.props,
      }))
    ```
    `setProps` will be:
    ```
    const setProp: (cb: (props: CraftProgramCollectionProps) => void, throttleRate?: number | undefined) => void
    ```
    kkshyu committed Oct 8, 2021
    Configuration menu
    Copy the full SHA
    c23d863 View commit details
    Browse the repository at this point in the history