Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Type definitions #90

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from
Draft

Type definitions #90

wants to merge 14 commits into from

Conversation

aminya
Copy link
Contributor

@aminya aminya commented Sep 27, 2020

This adds type definitions for etch.

@aminya
Copy link
Contributor Author

aminya commented Sep 27, 2020

@lierdakil Could you take a look at this?

export function dom<T extends keyof HTMLElementTagNameMap>(tag: T, props?: HTMLElementTagNameMap[T] & EtchExtraProps & Props, ...children: ChildSpec[]): EtchJSXElement
export function dom<T extends keyof SVGElementTagNameMap>(tag: T, props?: SVGElementTagNameMap[T] & EtchExtraProps & Props, ...children: ChildSpec[]): EtchJSXElement
export function dom<T extends JSX.ElementClass>( tag: ElementClassConstructor<T>, props: T["props"],...children: ChildSpec[]): EtchJSXElement
export function dom(tag: string, props?: EtchExtraProps & Props, ...children: ChildSpec[]): EtchJSXElement
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dom.tags are missing. I need to write a script to generate those instead of writing them by hand.

@aminya aminya mentioned this pull request Jan 7, 2021
3 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant