James Wyatt Cready-Pyle

Results 79 comments of James Wyatt Cready-Pyle

Actually, now I'm curious why the oneofs are structured the way they are currently. In protobufjs the `oneof` identifier could be used as the key of a property whose value...

I'm not at all attached to `kind`. Keeping it `oneofKind` works just as well. The important thing is that the the other key in the object is static, the one...

I've been taking a shot at making these changes this weekend and I'm wondering why a field name matching the `oneofKindDiscriminator` needs to be escaped if it **is not** part...

Ah, re-reading through the thread I see now this bit: >`PartialMessage` type uses the discriminator to identify oneof groups That's a bit unfortunate. The EBNF for both [proto2](https://developers.google.com/protocol-buffers/docs/reference/proto2-spec) and [proto3](https://developers.google.com/protocol-buffers/docs/reference/proto3-spec)...

One thing that is confusing to me is why `oneofKindDiscriminator` is even an option that can be set for the interpreter. Since that value is never communicated to the runtime...

>It also has some other options that can't be changed without changes to other packages - it's just good style to not repeat string literals all over, and instead of...

I spent some time trying to see if my idea of using element access using a constant string defined in the runtime, but apparently it won't work because TS is...

This is kind of random, but I found a way to generically convert between the current oneof shape and the new one (see it in action: [Playground](https://www.typescriptlang.org/play?#code/C4TwDgpgBA8gNgEwKIA8CGBbMcIwHYQD2AZlALwBQUUAPlAN5SEEkDSAlnggFxQDkaPgBooaXgGdgAJ04BzKAF8qtBkxbEOXXnwBGwqDt54Arhh0Qpi5XUbMiGzj34Bjfc947ChHGjxXqNmr2mk7GXBDEnBAIigDcFBSgkFAAchAA7qiY2Ljq5NaqANaO2oIiAG5ocMYQEtJy-iqMxVr8ehVVNUam5pZKAUUlLvqV1bUGXj5+-U1QLaHhkQQxCvGJ4ND49gASEHCQUgA8ytQAKkInUKxQECjAEFziUKc3dw8IT7bqIbyFECAkZ6KKAAfmeAG0+HY2I4+ABdKBGCDlCwUAB85CBt3uj1U0IcrWuClBENYCKRKKk8VuYEIUmAUGIYWcwHYzCgAAs9mAmXAtiRjtQzq8cR88d8hpIZHh5HQwggIlEELEoODCnVpbI4bwwoU8IR0tMLkKriL3k8XtjzeLgkM-gDSC9iWDTpD8SF4YioARKcahQBZM24xhqqCcK7awatQoq0ZdWDqXb7CyHc5zDHEpRogAU+N4pwAlLx-Wr-oD-QjAvMdYslcD6JdnMxJHNHJj8QA6d2OeIm9ikbMAQnmBYYlxNUggwGMUj8zSG8sVyzilxm1CbeBbcegZCCJDVjjhvaFAHoT1AAALAcQAWnYsn1k8uk+ns6jCA6YxXSnWyQAYlIhAYPyxBJgcgpCuclzXFauKWm8watq0UoNM6EJ8PMnoUqiGK7vBoqfEhTisLGnTjLq+qGsCLqQtuWHesiFjUigtL0oyzKsuyxCARgYG8iBEHCrBYrzsh9Qyioi5LNEpFjCCNZ6gaRrQUGYr4daolOChEloa6GGwuSDG+pcgbCYRobhmSvBfLa0bAgAZKo4JgGGfiFJGAFASBYEpmmhQZlYOZ5s8RZQCW9rlpWNowq0Ul1sSDYmhuLbdlw7bqB28zHtQ-ZQEOqUIKOiUmkKL4znOe4EgsCrSSs2WNNQZ6Xted4PnSEDPlO5XRVVIjggVkadtu34JEyeAsmyfjMHAIDwAgIHZrc2Q4Lwc1ZFgOAgUVShjRN7LTSAaTpAtS0beMR3rTkW0MD+CrOHAaCTlAyUMt4yDoGdq2IJdm3qPEd0PU9L0MZkH05LwF1g799hrE1b1QMAhAgxQwNvachBHZiXL7Px6i5t9UMQAW8QHUdC1oxjGTEwkTUEOkCNI29KPNgydPo3NmLcUBfHGHyeN0z9RMk3gM1zQtbOEHN1MUE1gHyje9RgBQB1i3jXO8dyuP2Nm2M8rz5ME8tRMFtTpMZAtutayQ2bqzzfPawLhMm8TQA)): ```ts type OldExampleOneof...

For what it's worth I made some minor improvements so that you can do the conversion to/from the "useful" oneof **type** which is especially useful if your linter requires that...

Was this this discovery made in some off-github discussion? I'm curious more than anything since I can't find any issue or PR mentioning this. Glad it was spotted though! Completely...