Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support hyperscript #52

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions dist/esm/src/elements.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/// <reference path="../../../src/jsx/element-types.d.ts" />
/// <reference path="../../../src/jsx/events.d.ts" />
/// <reference path="../../../src/jsx/intrinsic-elements.d.ts" />
declare type AttributeValue = any;
export interface Children {
children?: AttributeValue;
}
export interface CustomElementHandler {
(attributes: Attributes & Children, contents: string[]): string;
}
export interface Attributes {
[key: string]: AttributeValue;
}
export declare function createElement(name: string | CustomElementHandler, attributes?: Attributes & Children | undefined, ...contents: string[]): string;
export {};
//# sourceMappingURL=elements.d.ts.map
1 change: 1 addition & 0 deletions dist/esm/src/elements.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

113 changes: 113 additions & 0 deletions dist/esm/src/elements.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/esm/src/elements.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/esm/src/tsconfig.tsbuildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"program":{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../src/jsx/element-types.d.ts","../../../src/jsx/events.d.ts","../../../src/jsx/intrinsic-elements.d.ts","../../../src/elements.tsx"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6",{"version":"1dad4fe1561d99dfd6709127608b99a76e5c2643626c800434f99c48038567ee","affectsGlobalScope":true},{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"cd8a4b93731b5b29232387dd400975f733a9861e3133f6965e38a1e094661f64","affectsGlobalScope":true},{"version":"4104fa2d32fc91cb97b1bea62279fe252715ea5149033eaac7c1baa0669865d2","affectsGlobalScope":true},{"version":"27598174df5043b3e2f86eecbc5df0882e9cb35af8f90aa85486f5cc55cc284a","affectsGlobalScope":true},"7d92b1b3ded9883354ecd0916606dea9e95d780bf8f50aa97897dc48c9d13756"],"options":{"composite":true,"declaration":true,"declarationMap":true,"jsx":2,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitAny":true,"noImplicitReturns":true,"noImplicitThis":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"..","rootDir":"../../..","sourceMap":true,"strict":true,"target":99},"fileIdsList":[[13,14,15]],"referencedMap":[[16,1]],"exportedModulesMap":[[16,1]],"semanticDiagnosticsPerFile":[3,5,4,2,6,7,8,9,10,11,12,1,16,13,14,15]},"version":"4.3.5"}
16 changes: 16 additions & 0 deletions dist/src/elements.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/// <reference path="../../src/jsx/element-types.d.ts" />
/// <reference path="../../src/jsx/events.d.ts" />
/// <reference path="../../src/jsx/intrinsic-elements.d.ts" />
declare type AttributeValue = any;
export interface Children {
children?: AttributeValue;
}
export interface CustomElementHandler {
(attributes: Attributes & Children, contents: string[]): string;
}
export interface Attributes {
[key: string]: AttributeValue;
}
export declare function createElement(name: string | CustomElementHandler, attributes?: Attributes & Children | undefined, ...contents: string[]): string;
export {};
//# sourceMappingURL=elements.d.ts.map
1 change: 1 addition & 0 deletions dist/src/elements.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

117 changes: 117 additions & 0 deletions dist/src/elements.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/src/elements.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading