Skip to content

Add Napi bindings js part generation too #27

@noartem

Description

@noartem

For now, c++ part of bindings is generated automatically from js-based DSL. It would be awesome to generate JS-part (lib/elementor.ts) too.

Default method implementation will be transformed from C++ part:

  1. JS Arguments types will be cast from c++ arguments:
C++ JavaScript
std::string string
int number
float number
Size Size
Element Element
  1. Default method implementation will be something like this:
class ClassName {
  methodName(...args) {
    super.methodName(...args);
    return this;
  }
  methodName(...args) {
    return super.methodName(...args); // if body last line starts with return
  }
}

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions