Managing each document object as a separate identity is difficult and largely not useful in the type of work currently required of this project.
Expose Form, Document Catalog/Trailer/(Body?), Page Resource/Contents as high level apis.
Top level objects should expose getters/setters for required fields (ex. the Form class should provide easy access to the Fields dictionary since that is a required property of Form)
Resolve all references by default, if an object is a reference, resolve the it's object data type i.e. Dictionary, Array, etc... and return this to the user. Returning a reference should be a special request, as with setting an object, if the user wishes the object be set as a reference than this too should be a special request or the default option.
Add typescript definitions for each class as it is from c++. The internal implementation will be abbreviated with 'I', where IDocument is the interface to new bindings.Document(), and Document is whatever the JS lib exposes.
Managing each document object as a separate identity is difficult and largely not useful in the type of work currently required of this project.
Expose Form, Document Catalog/Trailer/(Body?), Page Resource/Contents as high level apis.
Top level objects should expose getters/setters for required fields (ex. the Form class should provide easy access to the Fields dictionary since that is a required property of Form)
Resolve all references by default, if an object is a reference, resolve the it's object data type i.e. Dictionary, Array, etc... and return this to the user. Returning a reference should be a special request, as with setting an object, if the user wishes the object be set as a reference than this too should be a special request or the default option.
Add typescript definitions for each class as it is from c++. The internal implementation will be abbreviated with 'I', where IDocument is the interface to new bindings.Document(), and Document is whatever the JS lib exposes.
Verify cleanup with valgrind