microsoft / microsoft/TypeScript
Transpiling async/await to generators instead of es6-Generator-function for es6
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Go
- Estrellas
- 111k
- Forks
- 14.3k
- Merge medio
- 2 d 4 h
- PR fusionados (30 d)
- 132
Descripción
Search Terms
async await es6 transpile generator
Suggestion
If there was a compile option that i can tell the compiler to emit generators instead of es6-Generator-function when targeting es6.
Use Cases
I have to use 3rd-party libs that implemented in es6,so targeting es5 will not work. But i can't write code with async/await when targeting es6 because the platform on which to run the app dose not support yield/funtion* (but other es6 features's ok).
Examples
Checklist
I try Babel and regenerator, all of them transpile es6 code into es5(or other version), but then I can't use 3rd-party libs. Work round is applying transpilation on libs too.
My suggestion meets these guidelines:
- This wouldn't be a breaking change in existing TypeScript/JavaScript code
- This wouldn't change the runtime behavior of existing JavaScript code
- This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
- This feature would agree with the rest of TypeScript's Design Goals.
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
El issue no menciona archivos fuente, pruebas ni puntos de entrada del compilador. Empieza por rastrear cómo TypeScript transforma async/await para un destino ES6 y compara la salida del generador solicitada con la salida ES6 actual. Se considera terminado cuando una opción del compilador claramente definida produce la salida solicitada sin romper los destinos ni el comportamiento existentes.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript, typescript
- Área
- compilers
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 25/100