{"id":18738140,"url":"https://github.com/enginooby-practice/typescript","last_synced_at":"2025-11-18T00:30:14.779Z","repository":{"id":216465952,"uuid":"279543719","full_name":"enginooby-practice/typescript","owner":"enginooby-practice","description":null,"archived":false,"fork":false,"pushed_at":"2020-07-30T00:16:58.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-28T17:30:20.450Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/enginooby-practice.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-07-14T09:38:48.000Z","updated_at":"2020-07-30T00:17:00.000Z","dependencies_parsed_at":"2024-01-10T12:05:55.085Z","dependency_job_id":null,"html_url":"https://github.com/enginooby-practice/typescript","commit_stats":null,"previous_names":["enginooby-practice/typescript"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enginooby-practice%2Ftypescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enginooby-practice%2Ftypescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enginooby-practice%2Ftypescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enginooby-practice%2Ftypescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/enginooby-practice","download_url":"https://codeload.github.com/enginooby-practice/typescript/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239612027,"owners_count":19668285,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T15:28:26.836Z","updated_at":"2025-11-18T00:30:14.718Z","avatar_url":"https://github.com/enginooby-practice.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Practiced topics\n\n### Configuaration\n- Execute files:\n  - Go to directory containing the file in Terminal: ``` Ctrl+Shift+` ``` and chose the project\n  - Transpliling: ```tsc \u003cfile\u003e.ts``` to compile and generate JavaScript file ```\u003cfile\u003e.js``` {only ```tsc``` if configuration file ```tsconfig.json``` is available}\n  - Run the JavaScript file: ```node \u003cfile\u003e.js```\n  - Transpliling for every change\n  - Add flag ```--noEmitOnError``` to avoid generating js when error compiling\n- Add ```tsconfig.json``` in the root to define compiler options and project settings manually or by CLI: ```tsc --init``` \n[[tsconfig.json](https://github.com/cpulover-practice/typescript/blob/master/tsconfig.json)]\n  - Compile all ```*.ts``` files by default\n\n### Basic\n- Data types: boolean, number, string, any\n[[data-types.ts](https://github.com/cpulover-practice/typescript/blob/master/data-types.ts)]\n  - String interpolation: ``` `${var}` ``` for string concatenation\n  - Use ```any``` type only for generic methods ???\n- Loop \u0026 array \n[[loop-array.ts](https://github.com/cpulover-practice/typescript/blob/master/loop-array.ts)]\n  - Simplified ```for loop```: ```let _ of _```\n  - TypeScript array is dynamic/growable\n  - Add new element to array: ```push()```\n\n### Class\n[[Customer.ts]()]\n- Property\n  - Modifier: public, proteted, private\n  - Public by default\n  - Naming convention: prefix ```_```\n- Constructor\n  - Keyword ```this``` is required\n- Accessor vs Normal Getter/Setter\n  - Public by default\n  - Accessor is only supported in ES5+ (use ```--target ES5``` flag to fix)\n- Shortcut constructor: include properties and tradictional constructor\n[[Person.ts]()]\n\n### Inheritance \u0026 Interface\n[[Person.ts]()] [[Student.ts]()] [[Driver]()]\n- Single inheritance, multipe interfaces\n- Support abtract \u0026 overriding\n- Sub-classes must implement all abstract methods of the supper abstract class\n\n### Terminal Commands\n- ```tsc --build --clean```: removes all compiled js files\n- ```tsc --init```: generate template for configuration file ```tsconfig.json```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenginooby-practice%2Ftypescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenginooby-practice%2Ftypescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenginooby-practice%2Ftypescript/lists"}