Created
April 29, 2017 01:46
-
-
Save hrajchert/311a7083675a16238fb982e894195d82 to your computer and use it in GitHub Desktop.
This file contains 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
// TypeScript | |
let usuario1; | |
usuario1.nombre = 'Jose'; | |
usuario1.apellido = 'Perez' | |
ajax('http://mi-api.com/getUser') | |
.then(usuario => console.log(`nombre: ${usuario.nombres}`)) | |
// Crear interfaz IWorkshop | |
let workshop; | |
workshop.nombre = 'Introduccion a TS'; | |
workshop.profe = 'sherman3ero'; | |
workshop.lugar = { | |
oficina: 'Mercado libre', | |
calle: 'Leandro N Alem', | |
altura: 518 | |
} | |
workshop.fecha = new Date(); | |
declare function ajax<T = any>(url: string): Promise<T>; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment