Traducción del archivo src/posts/create.js a TypeScript#51
Open
Jeam-zx wants to merge 9 commits intoUSB-CI3715:f24from
Open
Traducción del archivo src/posts/create.js a TypeScript#51Jeam-zx wants to merge 9 commits intoUSB-CI3715:f24from
Jeam-zx wants to merge 9 commits intoUSB-CI3715:f24from
Conversation
Pull Request Test Coverage Report for Build 11320674411Details
💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Traducción de archivo src/posts/create.js a TypeScript
Jeamhowards Montiel (19-10234)
Resumen
He llevado a cabo la conversión del archivo
create.jsa TypeScript, generandocreate.tsen la misma ubicación.Motivación
Proceso
Preparación:
create.jspara identificar las estructuras de datos y funciones clave.Creación del nuevo archivo:
create.tsen el mismo directorio que el archivo original.create.jsacreate.tscomo punto de partida.Definición de tipos:
PostDatayPost, definiendo claramente la estructura de estos objetos.Conversión de sintaxis:
Manejo de tipos any:
anyimplícitamente y los reemplazé con tipos más específicos cuando fue posible.unknownen lugar deanypara mayor seguridad.Gestión de errores del compilador:
// @typescript-eslint/no-unsafe-member-accessy@typescript-eslint/no-unsafe-call.Documentación:
Verificación
Compilación:
tsc) para asegurar que no hubiera errores de compilación.Linting:
Pruebas:
Revisión manual:
Integración:
Observaciones adicionales
// @typescript-eslint/no-unsafe-member-accessy@typescript-eslint/no-unsafe-call. donde fue necesario para mantener la compatibilidad con el sistema existente.Issue
Este Pull Request resuelve el Issues USB-CI3715 #9 (resolves #9), en el cual se tenía como tarea traducir el archivo src/posts/create.js a Typescript.