scrooge-generator-typescript/src/main/resources/typescript/struct_read.mustache [8:20]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    while (true) {
        const ret = protocol.readFieldBegin();
        const ftype = ret.ftype;
        const fid = ret.fid;
        if (ftype === Thrift.Type.STOP) {
            break;
        }
        switch (fid) {
            {{#fields}}
            case {{index}}:
                if (ftype === {{thriftType}}) {
                    {{{readField}}}
                    result.{{name}} = value1;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



scrooge-generator-typescript/src/main/resources/typescript/union_read.mustache [4:16]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    while (true) {
        const ret = protocol.readFieldBegin();
        const ftype = ret.ftype;
        const fid = ret.fid;
        if (ftype === Thrift.Type.STOP) {
            break;
        }
        switch (fid) {
            {{#fields}}
            case {{index}}:
                if (ftype === {{thriftType}}) {
                    {{{readField}}}
                    result.{{name}} = value1;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



