https://kotlinlang.org logo
#javascript
Title
# javascript
m

mohamed rejeb

06/17/2023, 2:43 PM
Hi, how can I use this typescript function from Kotlin
Copy code
export function getStroke(
  points: (number[] | { x: number; y: number; pressure?: number })[],
  options: StrokeOptions = {} as StrokeOptions
): number[][]
I was trying with this but I keep getting this error
getStroke is not a function
Copy code
@JsModule("perfect-freehand")
@JsNonModule
external fun getStroke(
    points: Array<dynamic>,
    options: dynamic
): Array<Array<Double>>
v

Vampire

06/17/2023, 3:04 PM
iirc you need
@file:JsModule
here
thank you color 1
m

mohamed rejeb

06/17/2023, 3:09 PM
It works, thanks!
👌 1
4 Views