foxdonut/seview

Please add typescript typings

Opened this issue · 3 comments

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;

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

@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.

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