update typedefs & fix runtime error

This commit is contained in:
CoolElectronics 2024-04-25 18:27:02 -04:00
parent cad6e700f0
commit b670fd3d4f
No known key found for this signature in database
GPG key ID: F63593D168636C50
2 changed files with 3 additions and 1 deletions

3
dreamland.d.ts vendored
View file

@ -14,7 +14,7 @@ declare namespace JSX {
} }
declare function h( declare function h(
type: string, type: string | Component<any, any, any>,
props?: { [index: string]: any } | null, props?: { [index: string]: any } | null,
...children: (HTMLElement | string)[] ...children: (HTMLElement | string)[]
): Node ): Node
@ -59,6 +59,7 @@ declare function handle<T>(
): void ): void
declare function css(strings: TemplateStringsArray, ...values: any): string declare function css(strings: TemplateStringsArray, ...values: any): string
type scope = typeof css
type DLCSS = string type DLCSS = string

View file

@ -83,6 +83,7 @@ function genCss(str, scoped) {
const styleElement = document.createElement('style') const styleElement = document.createElement('style')
document.head.appendChild(styleElement) document.head.appendChild(styleElement)
let newstr, selfstr
if (scoped) { if (scoped) {
/* POLYFILL.SCOPE.START */ /* POLYFILL.SCOPE.START */
if (!scopeSupported) { if (!scopeSupported) {