Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Una simple convención que representa respuestas de servidor JSON.
/** Representa una respuesta JSON satisfactoria */
interface ResponseOk<T = null> {
success: true
data: T
}
/** Representa una respuesta JSON errónea */
interface ResponseFail<T = null> {
success: false
code: string|number
data: T
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment