mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-01 22:33:57 +00:00
Namer applied to Typescript generator (#7488)
* Namer applied to Typescript generator * fixes * More fixes Co-authored-by: Casper Neo <cneo@google.com> Co-authored-by: Derek Bailey <derekbailey@google.com>
This commit is contained in:
@@ -33,6 +33,9 @@ class IdlNamer : public Namer {
|
||||
std::string Type(const EnumDef &d) const { return Type(d.name); }
|
||||
|
||||
std::string Function(const Definition &s) const { return Function(s.name); }
|
||||
std::string Function(const std::string& prefix, const Definition &s) const {
|
||||
return Function(prefix + s.name);
|
||||
}
|
||||
|
||||
std::string Field(const FieldDef &s) const { return Field(s.name); }
|
||||
std::string Field(const FieldDef &d, const std::string &s) const {
|
||||
@@ -131,6 +134,12 @@ class IdlNamer : public Namer {
|
||||
suffix;
|
||||
}
|
||||
|
||||
// This is a mix of snake case and keep casing, when Ts should be using
|
||||
// lower camel case.
|
||||
std::string LegacyTsMutateMethod(const FieldDef& d) {
|
||||
return "mutate_" + d.name;
|
||||
}
|
||||
|
||||
private:
|
||||
std::string NamespacedString(const struct Namespace *ns,
|
||||
const std::string &str) const {
|
||||
|
||||
Reference in New Issue
Block a user