Skip to content

pgrm/typescript-this-explained

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

typescript-this-explained

It should shed light on the - for some people - confusing behaviour of this in TypeScript. I've found out some time ago, that it is already consuing enough in plain JavaScript, but TypeScript adds some more features with the arrow-notation for functions (() => {}), which can make it even more challengin. Especially for JavaScript and TypeScript beginners.

How to run it

after downloading the code run

npm install
npm start

this will install TypeScript in version 1.4, compile the script and run it. If you want to play with index.ts you can recompile and run it with npm start. The explenation is as comment inside the script.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published