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

Please add typescript typings #5

Open
kristianmandrup opened this issue Feb 5, 2019 · 3 comments
Open

Please add typescript typings #5

kristianmandrup opened this issue Feb 5, 2019 · 3 comments

Comments

@kristianmandrup
Copy link

kristianmandrup commented Feb 5, 2019

I think it would be something like this?

type element = object;

type transformFn = (node: any) => element;

export function sv(transform: transformFn, options: object): h;

type h = (tagname> string, props: Prop, children: element[] ) => element;
@foxdonut
Copy link
Owner

foxdonut commented Feb 6, 2019

@kristianmandrup best thing would be to submit a pull request.

@kristianmandrup
Copy link
Author

@foxdonut Sure, just wanted your input on the typings first.

Does it look more or less correct to you? Will need a little more experimentation I think.
Guess the best way to find out is to write a small typescript sample app.

Do you know anyone using seview on typescript? I'm also in the process of writing a fable binding, so need to have the understanding of the types correct.

@kristianmandrup
Copy link
Author

I've just updated the above typings to more accurately reflect my current understanding of the API.

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

2 participants