-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Did some testing to see if this works in the browser really, and it actually does! Super cool! It even works on iOS. I guess it's more of a TypeScript thing to test, since it more depends on that being able to transpile down to runnable-JS. I also collapsed some of the `createElement()` types to use the JSX ones I already defined in the `namespace JSX` declaration. Found an issue with importing a component from a module, as both a type, and a side-effect declaration, so I had to look into a setting to configure how the imports should be handled for other scripts. Another way around from running into this is to simply load the script with an inline-import (`import "./web-component.js"`), versus as a default/named import (`import { WebComponent } from "./web-component.js"`). The problem is that TypeScript doesn't see this script as a side-effect script, while it is still required to be able to define `WebComponent` as a custom element for the window. So if you do these on two separate lines, instead of one + the config change, then you don't have to change your TypeScript config settings for that.
- Loading branch information
1 parent
bbe3307
commit 9ccff98
Showing
5 changed files
with
11 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters