Skip to content

Commit e044185

Browse files
committed
Add TypeScript definitions for JSX renderer
1 parent d241cc9 commit e044185

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"build": "npm run -s transpile && npm run -s transpile:jsx && npm run -s copy-typescript-definition",
1212
"transpile": "microbundle src/index.js -f es,umd --target web --external preact",
1313
"transpile:jsx": "microbundle src/jsx.js -o dist/jsx.js --target web --external none && microbundle dist/jsx.js -o dist/jsx.js -f cjs",
14-
"copy-typescript-definition": "copyfiles -f src/index.d.ts dist",
14+
"copy-typescript-definition": "copyfiles -f src/*.d.ts dist",
1515
"test": "eslint src test && tsc && mocha -r babel-core/register test/**/*.js",
1616
"prepublish": "npm run build",
1717
"release": "npm run build && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"

src/jsx.d.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { VNode } from 'preact';
2+
3+
interface Options {
4+
jsx?: boolean;
5+
xml?: boolean;
6+
functions?: boolean
7+
functionNames?: boolean,
8+
skipFalseAttributes?: boolean
9+
pretty?: boolean | string;
10+
}
11+
12+
export function render(vnode: VNode, context?: any, options?: Options):string;
13+
export default render;

0 commit comments

Comments
 (0)