Skip to content

Instantly share code, notes, and snippets.

@vvakame
Last active November 3, 2016 08:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vvakame/e7a230fa558763e225b58d57b459f64d to your computer and use it in GitHub Desktop.
Save vvakame/e7a230fa558763e225b58d57b459f64d to your computer and use it in GitHub Desktop.
SkateJS + TypeScript(TSX). see README.md
node_modules/
.vscode/
npm-debug.log
index.js
index.jsx

SkateJS + TypeScript (TSX)

How to try?

$ npm install (or yarn install)
$ npm run build
(ignore compiling error...)
$ open index.html

What is wrong?

Compile errors occured. It is unexpected result. maybe... I'm a jsx beginner.

$ $(npm bin)/tsc -p ./
index.tsx(34,13): error TS2324: Property 'ATTRIBUTE_NODE' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'CDATA_SECTION_NODE' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'COMMENT_NODE' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'DOCUMENT_FRAGMENT_NODE' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'DOCUMENT_NODE' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'DOCUMENT_POSITION_CONTAINED_BY' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'DOCUMENT_POSITION_CONTAINS' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'DOCUMENT_POSITION_DISCONNECTED' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'DOCUMENT_POSITION_FOLLOWING' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'DOCUMENT_POSITION_PRECEDING' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'DOCUMENT_TYPE_NODE' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'ELEMENT_NODE' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'ENTITY_NODE' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'ENTITY_REFERENCE_NODE' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'NOTATION_NODE' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'PROCESSING_INSTRUCTION_NODE' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'TEXT_NODE' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'accessKey' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'addEventListener' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'appendChild' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'attributes' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'baseURI' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'blur' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'childElementCount' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'childNodes' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'children' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'classList' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'className' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'click' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'clientHeight' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'clientLeft' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'clientTop' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'clientWidth' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'cloneNode' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'closest' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'compareDocumentPosition' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'contains' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'contentEditable' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'dataset' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'dir' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'dispatchEvent' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'dragDrop' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'draggable' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'firstChild' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'firstElementChild' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'focus' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'getAttribute' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'getAttributeNS' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'getAttributeNode' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'getAttributeNodeNS' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'getBoundingClientRect' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'getClientRects' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'getElementsByClassName' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'getElementsByTagName' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'getElementsByTagNameNS' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'hasAttribute' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'hasAttributeNS' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'hasAttributes' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'hasChildNodes' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'hidden' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'hideFocus' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'id' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'innerHTML' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'innerText' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'insertAdjacentElement' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'insertAdjacentHTML' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'insertAdjacentText' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'insertBefore' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'isContentEditable' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'isDefaultNamespace' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'isEqualNode' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'isSameNode' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'lang' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'lastChild' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'lastElementChild' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'localName' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'lookupNamespaceURI' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'lookupPrefix' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'matches' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'msContentZoomFactor' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'msGetInputContext' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'msGetRegionContent' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'msGetUntransformedBounds' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'msMatchesSelector' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'msRegionOverflow' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'msReleasePointerCapture' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'msSetPointerCapture' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'msZoomTo' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'myCounter' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'namespaceURI' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'nextElementSibling' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'nextSibling' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'nodeName' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'nodeType' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'nodeValue' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'normalize' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'offsetHeight' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'offsetLeft' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'offsetParent' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'offsetTop' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'offsetWidth' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onabort' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onactivate' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onariarequest' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onbeforeactivate' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onbeforecopy' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onbeforecut' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onbeforedeactivate' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onbeforepaste' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onblur' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'oncanplay' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'oncanplaythrough' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onchange' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onclick' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'oncommand' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'oncontextmenu' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'oncopy' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'oncuechange' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'oncut' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'ondblclick' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'ondeactivate' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'ondrag' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'ondragend' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'ondragenter' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'ondragleave' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'ondragover' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'ondragstart' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'ondrop' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'ondurationchange' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onemptied' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onended' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onerror' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onfocus' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'ongotpointercapture' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'oninput' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'oninvalid' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onkeydown' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onkeypress' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onkeyup' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onload' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onloadeddata' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onloadedmetadata' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onloadstart' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onlostpointercapture' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onmousedown' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onmouseenter' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onmouseleave' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onmousemove' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onmouseout' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onmouseover' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onmouseup' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onmousewheel' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onmscontentzoom' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onmsgesturechange' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onmsgesturedoubletap' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onmsgestureend' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onmsgesturehold' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onmsgesturestart' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onmsgesturetap' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onmsgotpointercapture' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onmsinertiastart' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onmslostpointercapture' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onmsmanipulationstatechanged' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onmspointercancel' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onmspointerdown' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onmspointerenter' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onmspointerleave' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onmspointermove' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onmspointerout' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onmspointerover' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onmspointerup' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onpaste' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onpause' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onplay' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onplaying' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onpointercancel' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onpointerdown' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onpointerenter' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onpointerleave' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onpointermove' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onpointerout' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onpointerover' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onpointerup' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onprogress' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onratechange' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onreset' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onscroll' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onseeked' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onseeking' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onselect' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onselectstart' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onstalled' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onsubmit' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onsuspend' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'ontimeupdate' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'ontouchcancel' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'ontouchend' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'ontouchmove' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'ontouchstart' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onvolumechange' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onwaiting' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onwebkitfullscreenchange' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onwebkitfullscreenerror' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'onwheel' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'outerHTML' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'outerText' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'ownerDocument' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'parentElement' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'parentNode' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'prefix' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'previousElementSibling' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'previousSibling' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'querySelector' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'querySelectorAll' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'releasePointerCapture' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'remove' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'removeAttribute' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'removeAttributeNS' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'removeAttributeNode' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'removeChild' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'removeEventListener' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'render' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'replaceChild' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'requestFullscreen' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'requestPointerLock' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'scroll' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'scrollBy' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'scrollHeight' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'scrollIntoView' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'scrollLeft' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'scrollTo' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'scrollTop' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'scrollWidth' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'setActive' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'setAttribute' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'setAttributeNS' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'setAttributeNode' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'setAttributeNodeNS' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'setPointerCapture' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'spellcheck' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'style' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'tabIndex' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'tagName' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'textContent' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'title' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'webkitMatchesSelector' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'webkitRequestFullScreen' is missing in type 'ComponentA'.
index.tsx(34,13): error TS2324: Property 'webkitRequestFullscreen' is missing in type 'ComponentA'.
<!doctype html>
<html>
<head>
<meta charset="utf8">
</head>
<body>
SkateJS + TypeScript TSX
<hr>
<x-main></x-main>
<script src="./node_modules/skatejs/dist/index-with-deps.js"></script>
<script src="./index.js"></script>
</body>
</html>
// import * as skate from "skatejs";
const React = { createElement: skate.h };
const ComponentA = skate.define("x-component-a", class ComponentA extends skate.Component {
myCounter = 0;
click() {
this.myCounter += 1;
}
render(elem: this): JSX.Element {
return (
<div>
{this.myCounter} <button onClick={() => this.click()}>Count up</button>
</div>
);
}
static get props() {
return {
myCounter: { attribute: true },
};
}
static render(elem: any) {
return elem.render(elem);
}
});
skate.define("x-main", class Main extends skate.Component {
render(elem: this): JSX.Element {
return (
<ComponentA myCounter={-3}></ComponentA>
);
}
static render(elem: any) {
return elem.render(elem);
}
});
{
"name": "skatejs-til",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"build": "tsc -p ./"
},
"author": "vvakame",
"license": "MIT",
"dependencies": {
"skatejs": "^4.0.3",
"skatejs-web-components": "^2.0.1"
},
"devDependencies": {
"typescript": "^2.0.6"
}
}
export as namespace skate;
export let h: any;
export let define: {
<T extends typeof Component>(name: string, definition: T): T;
};
// https://github.com/skatejs/skatejs#using-es2015-classes
// https://github.com/skatejs/skatejs/blob/6326a00dfacfed0d540c3f030f2220bc3f3a033d/src/api/component.js#L88-L94
export class Component extends HTMLElement {
}
declare global {
// https://www.typescriptlang.org/docs/handbook/jsx.html
namespace JSX {
interface ElementClass {
render(elem: this): JSX.Element; // TODO temp
}
interface ElementAttributesProperty {
'': any;
}
interface Element {
}
interface IntrinsicElements {
div: any;
button: any;
}
}
}
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"lib": [
"es2016",
"dom"
],
"jsx": "react",
"baseUrl": ".",
"paths": {
"skatejs": ["./skatejs"]
},
"noImplicitAny": true,
"strictNullChecks": true,
"types": [
],
"forceConsistentCasingInFileNames": true
},
"include": [
"./index.tsx",
"./skatejs.d.ts"
]
}
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
custom-event-polyfill@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/custom-event-polyfill/-/custom-event-polyfill-0.3.0.tgz#99807839be62edb446b645832e0d80ead6fa1888"
date-now@1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/date-now/-/date-now-1.0.1.tgz#bb7d086438debe4182a485fb3df3fbfb99d6153c"
debounce@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/debounce/-/debounce-1.0.0.tgz#0948af513d2e4ce407916f8506a423d3f9cf72d8"
dependencies:
date-now "1.0.1"
document-register-element@1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/document-register-element/-/document-register-element-1.2.0.tgz#aa0f1312320b4155ac13599edeb7a7cda4d5ac2a"
incremental-dom@0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/incremental-dom/-/incremental-dom-0.4.1.tgz#80eb151969bd52054dc29a4720c4e89abd103401"
skatejs-named-slots@2.0.4:
version "2.0.4"
resolved "https://registry.yarnpkg.com/skatejs-named-slots/-/skatejs-named-slots-2.0.4.tgz#66ab654f80ba553d956df8c76ec65b8fc9fe2362"
dependencies:
custom-event-polyfill "^0.3.0"
debounce "^1.0.0"
weak-map "^1.0.5"
skatejs-web-components@^2.0.1:
version "2.0.2"
resolved "https://registry.yarnpkg.com/skatejs-web-components/-/skatejs-web-components-2.0.2.tgz#7b51d4a6a5d0b63dee2e1502b829f729d9aed84a"
dependencies:
document-register-element "1.2.0"
skatejs-named-slots "2.0.4"
skatejs@^4.0.3:
version "4.0.4"
resolved "https://registry.yarnpkg.com/skatejs/-/skatejs-4.0.4.tgz#d6902d111d39fd82a4519980711807a46585f2c8"
dependencies:
incremental-dom "0.4.1"
window-or-global "^1.0.1"
typescript@^2.0.6:
version "2.0.6"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.0.6.tgz#5385499ac9811508c2c43e0ea07a1ddca435e111"
weak-map@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/weak-map/-/weak-map-1.0.5.tgz#79691584d98607f5070bd3b70a40e6bb22e401eb"
window-or-global@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/window-or-global/-/window-or-global-1.0.1.tgz#dbe45ba2a291aabc56d62cf66c45b7fa322946de"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment