Changed the JavaScript generation to emit createX helper functions just like the TypeScript code generation. I also added code so that the create methods have documentation in both JavaScript and TypeScript. (#5168)

This commit is contained in:
Christopher Cifra
2019-02-14 18:00:33 -06:00
committed by Wouter van Oortmerssen
parent b650dfba49
commit 9d483a3f0b
5 changed files with 363 additions and 52 deletions

View File

@@ -103,6 +103,17 @@ NamespaceA.NamespaceB.TableInNestedNS.endTableInNestedNS = function(builder) {
return offset;
};
/**
* @param {flatbuffers.Builder} builder
* @param {number} foo
* @returns {flatbuffers.Offset}
*/
NamespaceA.NamespaceB.TableInNestedNS.createTableInNestedNS = function(builder, foo) {
NamespaceA.NamespaceB.TableInNestedNS.startTableInNestedNS(builder);
NamespaceA.NamespaceB.TableInNestedNS.addFoo(builder, foo);
return NamespaceA.NamespaceB.TableInNestedNS.endTableInNestedNS(builder);
}
/**
* @constructor
*/