Skip to main content

TypeScript: Notes

Typed JavaScript at Any Scale - TypeScript extends JavaScript by adding types.

Install TypeScript

PS D:\projects\lthwts> npm install -g typescript
D:\nodejs\tsc -> D:\nodejs\node_modules\typescript\bin\tsc
D:\nodejs\tsserver -> D:\nodejs\node_modules\typescript\bin\tsserver
+ typescript@3.8.3
added 1 package from 1 contributor in 4.843s

PS D:\projects\lthwts> tsc --version
Version 3.8.3
PS D:\projects\lthwts>

Update TypeScript

PS D:\projects\lthwts> npm install -g typescript
D:\nodejs\tsc -> D:\nodejs\node_modules\typescript\bin\tsc
D:\nodejs\tsserver -> D:\nodejs\node_modules\typescript\bin\tsserver
+ typescript@4.5.4
updated 1 package in 67.965s
PS D:\projects\lthwts> tsc --version
Version 4.5.4
PS D:\projects\lthwts>
Hello Work TypeScript with Microsoft Visual Code

Free courses to learn TypeScript

Popular posts from this blog

Powershell: Enable Firewall Log

We sometimes need to enable Windows firewall's log to troubleshoot. Here is how.

Powershell: head and tail command

Use head or tail to skim the first or last 5 lines.

MySQL: Notes

Ways to check MySQL version mysql --version mysql -V dpkg -l 'mysql-sever' mysql -u root -p How to check MySQL version: mysql --version Database folder On Microsoft Windows, by default, MySQL save databases in this folder: %ProgramData%\MySQL\MySQL Server 5.5\data Check databases' size SELECT table_schema AS "Database name", SUM(data_length + index_length) / 1024 / 1024 AS "Size (MB)" FROM information_schema.TABLES GROUP BY table_schema; Export database schema $ mysqldump -u root -p --no-data wordpress1001 > c:\backup\schema-wordpress1001.sql Enter password: **************** Create a dedicated user to backup databases Give credit to: http://www.fromdual.com/privileges-of-mysql-backup-user-for-mysqldump Create dedicated mysql user and grant privileges to run backup $ mysql -u root -p CREATE USER 'backupdb'@'localhost' IDENTIFIED BY 'passwordhere'; GRANT SELECT,SHOW VIEW,RELOAD,REPLICATION CLIENT...