New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
transpiler: Add support for generics to traceur. Type<SubType1, SubType2> #8
Comments
Changed parser to just eat up the generics, no change to the AST yet. |
Traceur has just added support for generics, see google/traceur-compiler@32aadd5 |
This means |
Here is my understanding of the state of this feature (@vicb can correct me): We are missing:
How do we generate type annotations and runtime type assertions? I suggest this: function foo(a: Bar, b: Bar<Baz>) {}
// Currently we generate this:
foo.parameters = [[Bar]];
// I suggest to generate this:
foo.parameters = [[new TypeAnnotation(Bar)], [new TypeAnnotation(Bar, Baz)]]; That means, traceur-runtime need to define the How about type assertions? Should we do something like this?
|
I was thinking something along these lines:
This means that only types which define Thoughts? |
@mhevery That would indicate that if I write a generic class, it would generate a |
@mhevery I like this! It would be good to limit the amount of garbage we create. @Alxandr yes, we can generate the |
So here's the updated list of tasks:
|
I'm going to work on this today. |
For Traceur, I currently transform the TypeReference A<B, C> to $traceurRuntime.genericType(A2, B2, C2);
// where A2 is the transformed A which in turn creates a new instance of google/traceur-compiler@633acbc#diff-c5472491bfb53e84718d853046894688R39 This is all very adhoc at the moment. |
We actually never removed our hack from our transpiler, so we never used the new feature from traceur. See #554 |
Updating [angular#8.0.x](https://github.com/angular/angular/tree/8.0.x) from [cli-builds#8.0.x](https://github.com/angular/cli-builds/tree/8.0.x). ## Relevant changes in [commit range](angular/cli-builds@9a3d36c...e8bdfe6): **Modified** - help/update.json ##
) Updating [#8.0.x](https://github.com/angular/angular/tree/8.0.x) from [cli-builds#8.0.x](https://github.com/angular/cli-builds/tree/8.0.x). ## Relevant changes in [commit range](angular/cli-builds@9a3d36c...e8bdfe6): **Modified** - help/update.json ## PR Close #30777
Updating [angular#8.0.x](https://github.com/angular/angular/tree/8.0.x) from [cli-builds#8.0.x](https://github.com/angular/cli-builds/tree/8.0.x). ## Relevant changes in [commit range](angular/cli-builds@e8bdfe6...d09f130): **Modified** - help/serve.json ##
) Updating [#8.0.x](https://github.com/angular/angular/tree/8.0.x) from [cli-builds#8.0.x](https://github.com/angular/cli-builds/tree/8.0.x). ## Relevant changes in [commit range](angular/cli-builds@e8bdfe6...d09f130): **Modified** - help/serve.json ## PR Close #30909
Updating [angular#8.0.x](https://github.com/angular/angular/tree/8.0.x) from [cli-builds#8.0.x](https://github.com/angular/cli-builds/tree/8.0.x). ## Relevant changes in [commit range](angular/cli-builds@d09f130...e567d15): **Modified** - help/build.json - help/generate.json - help/new.json - help/serve.json - help/test.json ##
) Updating [#8.0.x](https://github.com/angular/angular/tree/8.0.x) from [cli-builds#8.0.x](https://github.com/angular/cli-builds/tree/8.0.x). ## Relevant changes in [commit range](angular/cli-builds@d09f130...e567d15): **Modified** - help/build.json - help/generate.json - help/new.json - help/serve.json - help/test.json ## PR Close #30971
Updating [angular#8.0.x](https://github.com/angular/angular/tree/8.0.x) from [cli-builds#8.0.x](https://github.com/angular/cli-builds/tree/8.0.x). ## Relevant changes in [commit range](angular/cli-builds@e567d15...7da1069): **Modified** - help/build.json ##
) Updating [#8.0.x](https://github.com/angular/angular/tree/8.0.x) from [cli-builds#8.0.x](https://github.com/angular/cli-builds/tree/8.0.x). ## Relevant changes in [commit range](angular/cli-builds@e567d15...7da1069): **Modified** - help/build.json ## PR Close #30999
Updating [angular#8.1.x](https://github.com/angular/angular/tree/8.1.x) from [cli-builds#8.0.x](https://github.com/angular/cli-builds/tree/8.0.x). ## Relevant changes in [commit range](angular/cli-builds@01a7186...823731f): **Modified** - help/analytics.json - help/build.json - help/e2e.json - help/generate.json - help/new.json - help/serve.json - help/test.json - help/update.json - help/xi18n.json ##
) Updating [#8.1.x](https://github.com/angular/angular/tree/8.1.x) from [cli-builds#8.0.x](https://github.com/angular/cli-builds/tree/8.0.x). ## Relevant changes in [commit range](angular/cli-builds@01a7186...823731f): **Modified** - help/analytics.json - help/build.json - help/e2e.json - help/generate.json - help/new.json - help/serve.json - help/test.json - help/update.json - help/xi18n.json ## PR Close #31308
Updating [angular#8.1.x](https://github.com/angular/angular/tree/8.1.x) from [cli-builds#8.1.x](https://github.com/angular/cli-builds/tree/8.1.x). ## Relevant changes in [commit range](angular/cli-builds@823731f...f99913e): **Modified** - help/add.json - help/analytics.json - help/build.json - help/doc.json - help/e2e.json - help/generate.json - help/new.json - help/serve.json - help/test.json - help/update.json - help/xi18n.json ##
) Updating [#8.1.x](https://github.com/angular/angular/tree/8.1.x) from [cli-builds#8.1.x](https://github.com/angular/cli-builds/tree/8.1.x). ## Relevant changes in [commit range](angular/cli-builds@823731f...f99913e): **Modified** - help/add.json - help/analytics.json - help/build.json - help/doc.json - help/e2e.json - help/generate.json - help/new.json - help/serve.json - help/test.json - help/update.json - help/xi18n.json ## PR Close #31620
Updating [angular#8.2.x](https://github.com/angular/angular/tree/8.2.x) from [cli-builds#8.1.x](https://github.com/angular/cli-builds/tree/8.1.x). ## Relevant changes in [commit range](angular/cli-builds@a8fe15c...6b6b8f8): **Modified** - help/build.json ##
Updating [angular#8.2.x](https://github.com/angular/angular/tree/8.2.x) from [cli-builds#8.1.x](https://github.com/angular/cli-builds/tree/8.1.x). ## Relevant changes in [commit range](angular/cli-builds@a8fe15c...6b6b8f8): **Modified** - help/build.json ##
) Updating [#8.2.x](https://github.com/angular/angular/tree/8.2.x) from [cli-builds#8.1.x](https://github.com/angular/cli-builds/tree/8.1.x). ## Relevant changes in [commit range](angular/cli-builds@a8fe15c...6b6b8f8): **Modified** - help/build.json ## PR Close #31856
Updating [angular#8.2.x](https://github.com/angular/angular/tree/8.2.x) from [cli-builds#8.2.x](https://github.com/angular/cli-builds/tree/8.2.x). ## Relevant changes in [commit range](angular/cli-builds@6b6b8f8...de49294): **Modified** - help/generate.json ##
) Updating [#8.2.x](https://github.com/angular/angular/tree/8.2.x) from [cli-builds#8.2.x](https://github.com/angular/cli-builds/tree/8.2.x). ## Relevant changes in [commit range](angular/cli-builds@6b6b8f8...de49294): **Modified** - help/generate.json ## PR Close #31926
Updating [angular#8.2.x](https://github.com/angular/angular/tree/8.2.x) from [cli-builds#8.2.x](https://github.com/angular/cli-builds/tree/8.2.x). ## Relevant changes in [commit range](angular/cli-builds@de49294...43fc440): **Modified** - help/serve.json ##
) Updating [#8.2.x](https://github.com/angular/angular/tree/8.2.x) from [cli-builds#8.2.x](https://github.com/angular/cli-builds/tree/8.2.x). ## Relevant changes in [commit range](angular/cli-builds@de49294...43fc440): **Modified** - help/serve.json ## PR Close #32148
Updating [angular#8.2.x](https://github.com/angular/angular/tree/8.2.x) from [cli-builds#8.3.x](https://github.com/angular/cli-builds/tree/8.3.x). ## Relevant changes in [commit range](angular/cli-builds@43fc440...e0055d2): **Added** - help/deploy.json **Modified** - help/generate.json - help/new.json - help/serve.json ##
) Updating [#8.2.x](https://github.com/angular/angular/tree/8.2.x) from [cli-builds#8.3.x](https://github.com/angular/cli-builds/tree/8.3.x). ## Relevant changes in [commit range](angular/cli-builds@43fc440...e0055d2): **Added** - help/deploy.json **Modified** - help/generate.json - help/new.json - help/serve.json ## PR Close #32175
Updating [angular#8.2.x](https://github.com/angular/angular/tree/8.2.x) from [cli-builds#8.3.x](https://github.com/angular/cli-builds/tree/8.3.x). ## Relevant changes in [commit range](angular/cli-builds@e0055d2...fcace36): **Modified** - help/add.json ##
Updating [angular#8.2.x](https://github.com/angular/angular/tree/8.2.x) from [cli-builds#8.3.x](https://github.com/angular/cli-builds/tree/8.3.x). ## Relevant changes in [commit range](angular/cli-builds@e0055d2...166cd15): **Modified** - help/add.json - help/deploy.json ##
) Updating [#8.2.x](https://github.com/angular/angular/tree/8.2.x) from [cli-builds#8.3.x](https://github.com/angular/cli-builds/tree/8.3.x). ## Relevant changes in [commit range](angular/cli-builds@e0055d2...166cd15): **Modified** - help/add.json - help/deploy.json ## PR Close #32286
Updating [angular#8.2.x](https://github.com/angular/angular/tree/8.2.x) from [cli-builds#8.3.x](https://github.com/angular/cli-builds/tree/8.3.x). ## Relevant changes in [commit range](angular/cli-builds@166cd15...ea386e0): **Modified** - help/generate.json ##
) Updating [#8.2.x](https://github.com/angular/angular/tree/8.2.x) from [cli-builds#8.3.x](https://github.com/angular/cli-builds/tree/8.3.x). ## Relevant changes in [commit range](angular/cli-builds@166cd15...ea386e0): **Modified** - help/generate.json ## PR Close #32298
Updating [angular#8.2.x](https://github.com/angular/angular/tree/8.2.x) from [cli-builds#8.3.x](https://github.com/angular/cli-builds/tree/8.3.x). ## Relevant changes in [commit range](angular/cli-builds@ea386e0...6734efe): **Modified** - help/e2e.json ##
) Updating [#8.2.x](https://github.com/angular/angular/tree/8.2.x) from [cli-builds#8.3.x](https://github.com/angular/cli-builds/tree/8.3.x). ## Relevant changes in [commit range](angular/cli-builds@ea386e0...6734efe): **Modified** - help/e2e.json ## PR Close #32414
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
The text was updated successfully, but these errors were encountered: