:wave: Extensions functions marked with `@JsExport...
# javascript
n
👋 Extensions functions marked with
@JsExport
are exported in this form:
Copy code
export declare function functionName(_this_: ExtendedClass);
Am I right to assume that the correct way of invoking this from typescript is:
Copy code
const class: ExtendedClass
...
functionName(class)
? If so, I’m getting a runtime error:
Copy code
TypeError: (0 , module__WEBPACK_IMPORTED_MODULE_2__.functionName is not a function
Thanks!
👀 1
t
cc @Artem Kobzar
a
Yes, your assumption is right, so it seems like a bug
n
Do you need an issue to be created in the tracker?
a
Yes, please
👍 1
e
Could you post the issue number here? Thanks!
n
Sure, let me create a reproducer first. I’ll work on that this week.
✔️ 1
thank you color 1
As I was actually expecting, I can’t reproduce it in a small project. I’ll keep investigating this.
As weird as it may sound, this seems to be some caching problem. Because the same code behaves correctly on another device. I’m generating the npm package using the Gradle task and then installing it using yarn in my Next project, so maybe there’s some cache I’m missing around.
a
Sounds so weird ☹️
gratitude thank you 1
n
Yeah don't worry, since this is something on my environment, I'll figure it out.