Created
February 21, 2018 23:57
-
-
Save danivicario/0c3fb38dea02196e7cfbed65d336c751 to your computer and use it in GitHub Desktop.
For Mike
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
import { Component } from '@angular/core'; | |
interface Employee { | |
name: string; | |
salary: number; | |
} | |
interface Test { | |
a: number; | |
b: Employee; | |
} | |
type ttt = (a: number, b: number) => number; | |
type Fun = (a: number, b: Employee) => string; | |
const f2: ttt = (a, b) => { | |
return a + b; | |
}; | |
@Component({ | |
selector: 'app-root', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.scss'] | |
}) | |
export class AppComponent { | |
title; | |
constructor() { | |
this.title = f2(3, 25); | |
} | |
test: Test = { | |
a: 4, | |
b: { | |
name: 'dani', | |
salary: 1000 | |
} | |
}; | |
f: Fun = (a: number, b2: Employee) => { | |
return 'a + b2'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment