Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ozzie-code-alt/typescript
Recap
https://github.com/ozzie-code-alt/typescript
Last synced: about 16 hours ago
JSON representation
Recap
- Host: GitHub
- URL: https://github.com/ozzie-code-alt/typescript
- Owner: Ozzie-code-alt
- Created: 2023-08-24T16:36:57.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-26T16:01:53.000Z (2 months ago)
- Last Synced: 2024-08-26T18:57:38.623Z (2 months ago)
- Language: TypeScript
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Course Notes
Typescript is created at Microsoft used to address the shortcommings of Javascript
TS: Adds these features
- Static Typing --> important one
- Code completion
- Refactoring
- Shorthand notationsStatic Means that variables are noticed at compile time. Like no "Hoisting" -- C++, C#, JAVA -- type is determined
Dynamic Means that variablles are noticed at runtime , and can change soo there is "Hoisting" -- JS, Python, Ruby -- type is not determined# Typesctipt is basically js with typecheking
# Drawbacks of Typescripts :
Compilations -- we have to give our TS file to compiler , we call this Transpilation
Disciplined in coding# Get Typescript version
`tsc -v` in cmd
# compile ts
`index.ts 'File'` in cmd to compile it to js# ts Config `tsc --init`
- target
- module
- rootDir
- outDir
- removeComments
- noEmitOnError
- sourceMap# Debugging
- add a breakpoint
- go to debug panel and click `create a launch.json file`
- instantiate launch.json and add this underneath program `"preLaunchTask": "tsc: build - tsconfig.json",`
- then start debugging# typescript have more datatype than the old ones like : String, Number. boolen, null, undefined. object
they are :
- any - Any can represent any type of values, basically this is an approach on how we can dynamically program in TS
- unknown
- never
- enum -
- tuple - tuples are only usefull with key/value pairs. Limit it to 2# Advanced Types
- Nullable
- Unkknown type
- never type# Tutorial Link
https://www.youtube.com/watch?v=d56mG7DezGs