Kotlin / dukat

Converter of <any kind of declarations> to Kotlin external declarations
552 stars 42 forks source link

React "material-ui" : unresolved reference React #162

Open up-to-you opened 6 years ago

up-to-you commented 6 years ago

After generation kotlin stubs for react material-ui (ts2kt v0.0.20, material-ui v0.20), runtime results:

src/material/index.__MaterialUI.kt:339:33: error: unresolved reference: React
external interface PaperProps : React.HTMLAttributes<Any>, React.Props<Paper> {
                                ^
bashor commented 6 years ago

RIght now you should convert react declarations by your self and maybe fix some references. Sorry for the inconvenience.

up-to-you commented 6 years ago

Can you provide example at least for this case ? I mean React declaration and its attributes. Thanks in advance!

bashor commented 6 years ago

Declarations that are you need are here https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react/v15/index.d.ts

lamba92 commented 6 years ago

yeah but i don't think those are compatible with JetBrains React Wrapper... Is there any solution to make material-ui work with the official wrappers?

goncalossilva commented 2 years ago

I'm seeing the same error with Reactist (among a few others):

Output

To reproduce, add to any Kotlin/JS project and build:

implementation(npm("@doist/reactist", "^11.0.0", generateExternals = true))