profile
viewpoint
Myles Scolnick mscolnick Palantir Technologies New York, NY http://mscolnick.github.io/

mscolnick/export-typescript 4

VSCode extension to export typescript in index.ts files

gseyffert/Ball-Tracking 3

Group project for CS194 Engineering Parallel Software, Fall 2014

mscolnick/react-window-portal 1

React portal to a window

sbarratt/radius-collider 1

Radius Collider Project - http://cet.berkeley.edu/radius-fall-2015/

mscolnick/awesome-nyc 0

A collection of awesome things to do in New York City

mscolnick/blueprint 0

A React-based UI toolkit for the web

startedksindi/managers-playbook

started time in 5 hours

startedjsforce/jsforce

started time in a month

startedmicrosoft/redux-dynamic-modules

started time in a month

startedthemsammy/tailwindcss-classnames

started time in a month

startedtrekhleb/javascript-algorithms

started time in 2 months

startedjlevy/the-art-of-command-line

started time in 2 months

startedpublic-apis/public-apis

started time in 2 months

starteddanistefanovic/build-your-own-x

started time in 2 months

startedvscodeshift/jss-codemorphs

started time in 2 months

push eventmscolnick/ts-proto

Myles Scolnick

commit sha ab05fc68e2aa047f9557ded88eb75ff7d409d943

add -1 to type-union

view details

push time in 2 months

pull request commentstephenh/ts-proto

Add unrecognized enum value

@stephenh i updated the type-union to have -1. let me know if that feels off, but it allows the consumer to do an exhaustive check on the type and force them to handle the unrecognized case.

mscolnick

comment created time in 2 months

push eventmscolnick/ts-proto

Myles Scolnick

commit sha 46efe8d268d9f25fde7114bb091e30d0e0e7b7e0

fix tests

view details

push time in 2 months

PR opened stephenh/ts-proto

Add unrecognized enum value

Fixes https://github.com/stephenh/ts-proto/issues/41

Update enum default to be UNRECOGNIZED / -1 to be consistent with how java generates enums.

e.g.

public enum ChangeType implements ProtocolMessageEnum {
    ADDED(0),
    REMOVED(1),
    MODIFIED(2),
    UNRECOGNIZED(-1);
+63 -15

0 comment

7 changed files

pr created time in 2 months

create barnchmscolnick/ts-proto

branch : add-unrecognized-enum-value

created branch time in 2 months

fork mscolnick/ts-proto

An idiomatic protobuf generator for TypeScript

fork in 2 months

issue commentstephenh/ts-proto

enums don't default to UNRECOGNIZED value like java

makes total sense. will put something up within the week. thank you

mscolnick

comment created time in 2 months

issue openedstephenh/ts-proto

enums don't default to UNRECOGNIZED value like java

To be compatible with newly added enums in proto definitions, the typescript enum deserialization should default to UNRECOGNIZED / -1

https://github.com/stephenh/ts-proto/blob/master/src/main.ts#L321

This is what java generates for enum

public enum ChangeType implements ProtocolMessageEnum {
    ADDED(0),
    REMOVED(1),
    MODIFIED(2),
    UNRECOGNIZED(-1);

Happy to make a contribution if you are ok with the update.

created time in 2 months

fork mscolnick/nylas-mail

:love_letter: An extensible desktop mail app built on the modern web. Forks welcome!

https://nylas.com/nylas-mail/

fork in 2 months

startedstephenh/ts-proto

started time in 3 months

more