You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Kaspar Fenner (JIRA)" <ji...@apache.org> on 2015/07/12 19:00:05 UTC
[jira] [Commented] (THRIFT-3223) TypeScript: Add initial support
for Enum Maps
[ https://issues.apache.org/jira/browse/THRIFT-3223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14623893#comment-14623893 ]
Kaspar Fenner commented on THRIFT-3223:
---------------------------------------
Thanks for the patch.
It's certainly a nice little improvement. I also like the link to the TypeScript pull request. It is for sure something we need to follow up with as soon as this is integrated in the TS compiler.
[~roger.meier] Can you pick it up for integration?
> TypeScript: Add initial support for Enum Maps
> ---------------------------------------------
>
> Key: THRIFT-3223
> URL: https://issues.apache.org/jira/browse/THRIFT-3223
> Project: Thrift
> Issue Type: Improvement
> Components: JavaScript - Compiler
> Reporter: Felipe Barriga Richards
> Labels: typescript
> Attachments: 0001-TypeScript-Added-support-for-maps-of-enums.patch
>
>
> This patch improve the generation of maps with enums. More improvements can be done but we need to have this issue solved first: https://github.com/Microsoft/TypeScript/pull/2652
> Old Code:
> {code}
> enum BarTypes {
> A = 0,
> B = 1
> }
> class Bar {
> }
> class Foo {
> bars: any;
> }
> {code}
> New Code:
> {code}
> enum BarTypes {
> A = 0,
> B = 1
> }
> class Bar {
> }
> class Foo {
> bars: { [k: number /*BarTypes*/]: Bar;
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)