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

Empty JS Object factory #200

Merged
merged 1 commit into from
Apr 16, 2020
Merged

Empty JS Object factory #200

merged 1 commit into from
Apr 16, 2020

Conversation

turansky
Copy link
Collaborator

No description provided.

@Leonya Leonya merged commit 99be452 into JetBrains:1.4-js-ir Apr 16, 2020
@@ -149,7 +149,7 @@ fun StyledComponents.injectGlobal(string: String) {
val globalStyleComponent = createGlobalStyle(string)
val element = window.document.body!!.appendChild(window.document.createElement("div")) as Element
element.setAttribute("id", "sc-global-style-${globalStylesCounter++}")
val reactElement = createElement(globalStyleComponent, js {})
val reactElement = createElement(globalStyleComponent, jsObject())
Copy link
Collaborator

@Leonya Leonya Apr 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@turansky compilation is failing with

> Task :kotlin-styled:compileKotlinJs FAILED
e: /Users/leonidkhachaturov/code/kotlin-wrappers/kotlin-styled/src/main/kotlin/styled/StyledComponents.kt: (152, 24): Type inference failed: Not enough information to infer parameter P in external fun <P : RProps> createElement(type: Any, props: P, vararg child: Any?): ReactElement
Please specify it explicitly.

e: /Users/leonidkhachaturov/code/kotlin-wrappers/kotlin-styled/src/main/kotlin/styled/StyledComponents.kt: (152, 60): Type inference failed: Not enough information to infer parameter T in inline fun <T : Any> jsObject(): T
Please specify it explicitly.

js {} and jsObject {} aren't the same thing.

@turansky turansky deleted the empty-jso-factory branch April 16, 2020 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants