diff --git a/dreamland.d.ts b/dreamland.d.ts index d3da8ac..78bc823 100644 --- a/dreamland.d.ts +++ b/dreamland.d.ts @@ -14,7 +14,7 @@ declare namespace JSX { } declare function h( - type: string, + type: string | Component, props?: { [index: string]: any } | null, ...children: (HTMLElement | string)[] ): Node @@ -59,6 +59,7 @@ declare function handle( ): void declare function css(strings: TemplateStringsArray, ...values: any): string +type scope = typeof css type DLCSS = string diff --git a/src/css.js b/src/css.js index 151a4f8..737b9fe 100644 --- a/src/css.js +++ b/src/css.js @@ -83,6 +83,7 @@ function genCss(str, scoped) { const styleElement = document.createElement('style') document.head.appendChild(styleElement) + let newstr, selfstr if (scoped) { /* POLYFILL.SCOPE.START */ if (!scopeSupported) {