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

Expose Tram-One type interfaces #199

Open
JRJurman opened this issue Aug 27, 2022 · 0 comments
Open

Expose Tram-One type interfaces #199

JRJurman opened this issue Aug 27, 2022 · 0 comments

Comments

@JRJurman
Copy link
Member

Summary

In the following example, it's not possible to define a strict type for ref, since we don't explicitly export TramOneHTMLElement.

const notesRef = useStore<{ ref: any }>({ ref: null });
useEffect((ref) => {
  notesRef.ref = ref;
});

Ideally we'd like to do the following:

const notesRef = useStore<{ ref: TramOneHTMLElement | null }>({ ref: null });

We should look into how we can expose this interface in a way that consumers can easily import these types. We should probably also update the website to reflect the exposed types.

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

No branches or pull requests

1 participant