New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeScript training notes #165
Comments
Why TypeScript
|
Types
I used the example from Angular/RxJS. something like: import notTypeScriptFunc from "lib";
notTypeScriptFunc(1,2,3) as number |
Functions
function legacyMultiply(a: any, b:any): any {
return a * b;
}
function bonusMaker(multiplier: number, ...names: string[]): number {
let total = 0;
for(var i = 0; i < names.length; i++) {
total = total + names[i].length;
}
return legacyMultiply( multiplier, total);
}
|
Classes
IS-a VS HAS-a
// instead of
d = new Dino()
d.eat()
// do this
eat({}) |
Interfaces
|
Guide should be tested in windows.
npm run solutions
on the homepage, this link does not work
The following isn't indented correctly:
We should include a
verifying solution
section, so people know what commands to run.Overviews should hint at the exercise.
The text was updated successfully, but these errors were encountered: