Skip to content

Instantly share code, notes, and snippets.

@vvakame
Last active November 23, 2016 10:47
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/0fa2940781e68f7e79cd53d2dd3f5728 to your computer and use it in GitHub Desktop.
Save vvakame/0fa2940781e68f7e79cd53d2dd3f5728 to your computer and use it in GitHub Desktop.
TypeScript+TSX with --jsxFactory issue ( https://github.com/Microsoft/TypeScript/issues/12467 )
node_modules/
npm-debug.log
.vscode
*.js
import "./jsx";
var skate: any;
const React = { createElement: skate.h };
class Component {
renderCallback() {
return <div>test</div>;
}
};
export { }
declare global {
// https://www.typescriptlang.org/docs/handbook/jsx.html
namespace JSX {
interface ElementClass {
renderCallback(): JSX.Element;
}
interface ElementAttributesProperty {
'': any;
}
interface Element {
}
interface IntrinsicElements {
div: any;
}
}
}
{
"name": "issue-jsx-factory",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"build": "tsc -p ./ && tsfmt -r",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "vvakame",
"license": "MIT",
"dependencies": {
},
"devDependencies": {
"typescript": "next",
"typescript-formatter": "^4.0.0"
}
}
{
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"jsx": "react",
"jsxFactory": "skate.h",
"noEmit": false
},
"include": [
"./index.tsx"
]
}
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
balanced-match@^0.4.1:
version "0.4.2"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838"
bluebird@^3.0.5:
version "3.4.6"
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.4.6.tgz#01da8d821d87813d158967e743d5fe6c62cf8c0f"
brace-expansion@^1.0.0:
version "1.1.6"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9"
dependencies:
balanced-match "^0.4.1"
concat-map "0.0.1"
commander@^2.9.0:
version "2.9.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4"
dependencies:
graceful-readlink ">= 1.0.0"
commandpost@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/commandpost/-/commandpost-1.0.1.tgz#7d7e3e69ae8fe7d6949341e91596ede9b2d631fd"
concat-map@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
editorconfig@^0.13.2:
version "0.13.2"
resolved "https://registry.yarnpkg.com/editorconfig/-/editorconfig-0.13.2.tgz#8e57926d9ee69ab6cb999f027c2171467acceb35"
dependencies:
bluebird "^3.0.5"
commander "^2.9.0"
lru-cache "^3.2.0"
sigmund "^1.0.1"
glob-expand@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/glob-expand/-/glob-expand-0.2.1.tgz#1b088ac272b57158870b76816111da4618a66a0f"
dependencies:
glob "~4.5.x"
lodash "~4.13.x"
glob@~4.5.x:
version "4.5.3"
resolved "https://registry.yarnpkg.com/glob/-/glob-4.5.3.tgz#c6cb73d3226c1efef04de3c56d012f03377ee15f"
dependencies:
inflight "^1.0.4"
inherits "2"
minimatch "^2.0.1"
once "^1.3.0"
"graceful-readlink@>= 1.0.0":
version "1.0.1"
resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725"
inflight@^1.0.4:
version "1.0.6"
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
dependencies:
once "^1.3.0"
wrappy "1"
inherits@2:
version "2.0.3"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
lodash@~4.13.x:
version "4.13.1"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.13.1.tgz#83e4b10913f48496d4d16fec4a560af2ee744b68"
lru-cache@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-3.2.0.tgz#71789b3b7f5399bec8565dda38aa30d2a097efee"
dependencies:
pseudomap "^1.0.1"
minimatch@^2.0.1:
version "2.0.10"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-2.0.10.tgz#8d087c39c6b38c001b97fca7ce6d0e1e80afbac7"
dependencies:
brace-expansion "^1.0.0"
once@^1.3.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
dependencies:
wrappy "1"
pseudomap@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"
sigmund@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590"
typescript-formatter@^4.0.0:
version "4.0.1"
resolved "https://registry.yarnpkg.com/typescript-formatter/-/typescript-formatter-4.0.1.tgz#ed82daf856cc9a379bb16b7f1aac9affee2974cd"
dependencies:
commandpost "^1.0.0"
editorconfig "^0.13.2"
glob-expand "^0.2.1"
typescript@next:
version "2.2.0-dev.20161123"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.2.0-dev.20161123.tgz#bdd7d9e84db2475801a03eb71303b9b629ddf8f6"
wrappy@1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment