emscripten-core / emscripten-core/emscripten

Adding a function on value_object

Open
#11,027 2 comments 1 reaction 1 assignee Claimed by @jgravelle-google View on GitHub
wontfix
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

I don't think this is supported but thought it's worth asking.
```
value_object("PersonRecord")
.field("name", &PersonRecord::name)
.field("age", &PersonRecord::age)
;
```
Is it possible to add a function on a value_object? i.e on the JS side can we do `person.doSomething()`
Wondering if we could leverage `field` to make it callable.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.