Skip to content

Learn how to write a command line utility of your own in pure modern TypeScript

License

Notifications You must be signed in to change notification settings

Jesssullivan/IntroTypeScript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IntroTypeScript

Lesson scaffolding to help me teach my housemates TypeScript


Learn how to write a command line utility of your own in pure modern TypeScript.

Lez write some code!

Open the following documentation pages in tabs in your browser:


What you should already have:

Setup:

# clone this repo:
git clone https://github.com/jesssullivan/IntroTypeScript && cd IntroTypeScript

# install typescript, node & eslint parser:
npm install 

## Setup your TS linter (only if you want to set up eslint yourself)
# npm init @eslint/config 

# Lint your TS:
npx eslint src/playground.ts

# Transpile some TS:
npm run-script tsc src/playground.ts

# Run your program:
node pub/playground.js 

To start, lets write a program that:

  • prompts the user to type "Hello World"
    • print some info about the response;
      • what is the type of user data we can use?
      • did the user type Hello World?
      • how many characters were typed?
      • how many more characters are needed to reach the number 42?

Lesson artefacts to add later:

  • Working with Webpack: bundling & tree shaking algorithms
  • Build a useful application for the browser: write some programmatic css, understanding the DOM, preform API calls from a client
  • Build a Chrome plugin
  • Build a file conversion tool with both a CLI and a neat browser user interface
  • Build a useful Flask + TypeScript application for mobile phones

About

Learn how to write a command line utility of your own in pure modern TypeScript

Topics

Resources

License

Stars

Watchers

Forks