I'm trying to write externals for a library (`deck...
# javascript
m
I'm trying to write externals for a library (
decky-frontend-lib
) but I'm strugging a bit as there's a lot of types that don't seem to exist in Kotlin like RouteProps, Omit, etc. How would I approach this? I already went ahead and replaced all instances of
JSX.Element
with
ReactElement<*>
t
TS
Copy code
function Link(props: LinkProps): JSX.Element
Kotlin:
Copy code
val Link: FC<LinkProps>
m
What about classes/types that don't exist?
t
RouteProps
from
react-router-dom
?
m
In my case the big struggling block is RefAttributes, supposedly from npm module React, but it's not present in any wrappers (as I need to target React 16.x.x)
t
It’s
PropsWithRef
according new/modern naming
m
If I use propswithref in my code, will it still work with react 16?
t
It will work - it’s just
Props
contract