-
Notifications
You must be signed in to change notification settings - Fork 28
Conversation
* Added dustjs-helpers package, so you can use @eq for basic logic in templates. It's a weird wrapper around dustjs-linkedin, so you require() it instead. * Added tsconfig.json file, so you can simply run "tsc" to compile everything.
It's a little confusing - I think dependencies is for things users of the library need. devDependencies are required for building and testing the library. http://stackoverflow.com/a/22004559/466698
Better support for proto3 map methods, and ProtoBuf.Js Long type.
Improved support for maps, especially with different key types. Merged in michelgb’s branch. Not sure why, but in 8686a72 it had "Message" appended to some generated message types? The functions that were previously in a superclass are now generated in a new derived class? I don’t know if that is closer to what ProtoBuf.js does maybe? Anyway, it would be good to merge this pull request, with much better support for maps. |
… for users of noImplicitAny.
I get why it was done that way now - allow type-checking of objects passed to constructor, without requiring them to be message objects with encode functions and other stuff.
…e names. Useful when using ProtoBuf.convertFieldsToCamelCase to match the JSON format expected by officialy proto3 JSON parsers (eg. in C++)
case 'sint64': | ||
case 'fixed64': | ||
case 'sfixed64': | ||
return "Long"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't look like the tests were run for this change - this results in a Cannot find name 'Long'. (TS2304)
error since "Long" is not a thing in typescript?
I did run the tests, and they all pass. |
Hei, The tests pass on my computer as well (clean install). |
Thank you for the contribution :-) |
Thanks! |
Implements #6 generating maps.
Only tested a little, but works for me.
Have only implemented support for using properties, not the get/set methods (I’ve never used get/set on a map). Should be straightforward if someone else wants to do so.
I have not tested yet with maps where keys are types other than string – have to see what Protobuf.JS generates in that case.