mirror of
https://github.com/MercuryWorkshop/dreamlandjs.git
synced 2025-05-15 15:10:02 -04:00
update typedefs & fix runtime error
This commit is contained in:
parent
cad6e700f0
commit
b670fd3d4f
2 changed files with 3 additions and 1 deletions
3
dreamland.d.ts
vendored
3
dreamland.d.ts
vendored
|
@ -14,7 +14,7 @@ declare namespace JSX {
|
|||
}
|
||||
|
||||
declare function h(
|
||||
type: string,
|
||||
type: string | Component<any, any, any>,
|
||||
props?: { [index: string]: any } | null,
|
||||
...children: (HTMLElement | string)[]
|
||||
): Node
|
||||
|
@ -59,6 +59,7 @@ declare function handle<T>(
|
|||
): void
|
||||
|
||||
declare function css(strings: TemplateStringsArray, ...values: any): string
|
||||
type scope = typeof css
|
||||
|
||||
type DLCSS = string
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue