Skip to content

Commit

Permalink
add first ts demos b00tc4mp#1
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelbarzi committed Jul 5, 2024
1 parent 2a9777a commit 9236204
Show file tree
Hide file tree
Showing 4 changed files with 549 additions and 0 deletions.
8 changes: 8 additions & 0 deletions stuff/demo/index.1.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const a: string = 'soy un string'
const b: number = 2
const c: number = 1

//const r: number = a + b
const r: number = b + c

console.log(r)
33 changes: 33 additions & 0 deletions stuff/demo/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
type User = {
name: string,
surname: string,
email: string,
username: string,
password: string
}

const peter: User = {
name: 'Peter',
surname: 'Pan',
email: '[email protected]',
username: 'peterpan',
password: '123123123'
}

console.log(peter)

const wendy: User = {
name: 'Wendy',
surname: 'Darling',
email: 'wendy@darling',
username: 'wendydarling',
password: '123123123'
}

console.log(wendy)

function printUser(user: User) {
console.log(user)
}

printUser({ name: 'Pepito', surname: 'Grillo', email: '[email protected]', username: 'pepitogrillo', password: '123123123' })
Loading

0 comments on commit 9236204

Please sign in to comment.