<commit_before><!-- vscode-markdown-toc -->
* 1. [Introduction.](#Introduction.)
	* 1.1. [What it is?](#Whatitis)
	* 1.2. [Why to use it?](#Whytouseit)
	* 1.3. [Install](#Install)
	* 1.4. [Compile A File](#CompileAFile)
* 2. [Types.](#Types.)
	* 2.1. [Enum](#Enum)
	* 2.2. [Any](#Any)
	* 2.3. [Void](#Void)
	* 2.4. [Null and Undefined](#NullandUndefined)
	* 2.5. [Never](#Never)
* 3. [`readonly` vs `const`](#readonlyvsconst)
* 4. [Implementing an interface](#Implementinganinterface)
* 5. [Difference between the static and instance sides of classes](#Differencebetweenthestaticandinstancesidesofclasses)
* 6. [Public by default](#Publicbydefault)
* 7. [Understanding `private`](#Understandingprivate)
* 8. [Understanding `protected`](#Understandingprotected)
* 9. [Parameter properties](#Parameterproperties)
* 10. [Constructor functions](#Constructorfunctions)
* 11. [Using a class as an interface](#Usingaclassasaninterface)
* 12. [Exporting a declaration](#Exportingadeclaration)
* 13. [Export statements](#Exportstatements)
* 14. [Re-exports](#Re-exports)
* 15. [Import a single export from a module](#Importasingleexportfromamodule)
* 16. [Import the entire module into a single variable, and use it to access the module exports](#Importtheentiremoduleintoasinglevariableanduseittoaccessthemoduleexports)
* 17. [Import a module for side-effects only](#Importamoduleforside-effectsonly)
* 18. [Ambient Modules](#AmbientModules)
	* 18.1. [Shorthand ambient modules](#Shorthandambientmodules)
	* 18.2. [Wildcard module declarations](#Wildcardmoduledeclarations)
	* 18.3. [UMD modules](#UMDmodules)
* 19. [Export as close to top-level as possible](#Exportasclosetotop-levelaspossible)
	* 19.1. [If you're only exporting a single `class` or `function`, use `export default`](#Ifyoureonlyexportingasingleclassorfunctionuseexportdefault)
		* 19.1.1. [MyClass.ts](#MyClass.ts)
		* 19.1.2. [MyFunc.ts](#MyFunc.ts)
		* 19.1.3. [Consumer.ts](#Consumer.ts)
	* 19.2. [If you're exporting multiple objects, put them all at top-level](#Ifyoureexportingmultipleobjectsputthemallattop-level)
		* 19.2.1. [MyThings.ts](#MyThings.ts)
	* 19.3. [Explicitly list imported names](#Explicitlylistimportednames)
		* 19.3.1. [Consumer.ts](#Consumer.ts-1)
	* 19.4. [Use the namespace import pattern if you're importing a large number of things](#Usethenamespaceimportpatternifyoureimportingalargenumberofthings)
		* 19.4.1. [MyLargeModule.ts](#MyLargeModule.ts)
		* 19.4.2. [Consumer.ts](#Consumer.ts-1)
* 20. [Re-export to extend](#Re-exporttoextend)
		* 20.1. [Calculator.ts](#Calculator.ts)
		* 20.2. [TestCalculator.ts](#TestCalculator.ts)
		* 20.3. [ProgrammerCalculator.ts](#ProgrammerCalculator.ts)
		* 20.4. [TestProgrammerCalculator.ts](#TestProgrammerCalculator.ts)
* 21. [Do not use namespaces in modules](#Donotusenamespacesinmodules)
* 22. [Red Flags](#RedFlags)

<!-- vscode-markdown-toc-config
	numbering=true
	autoSave=true
	/vscode-markdown-toc-config -->
<!-- /vscode-markdown-toc -->#Typescript 


##  1. <a name='Introduction.'></a>Introduction.
###  1.1. <a name='Whatitis'></a>What it is?
Typescript it's a language that compiles into Javascript and try to prevent some of the most common issues made by the developers in the work time and add some of the new ecma standards to JS even though it's not completely supported by all browsers. 


###  1.2. <a name='Whytouseit'></a>Why to use it?
Javascript was made originally to add some web page interactivity. Now Javascript it's the core language for the frontend development and some project like nodeJS and derivates and it have a lot of applications like web app servers, IoT, or drones manipulation etc.

Now the use of JS have good and bad parts some times those are the same. The loose of types the versatility, flexibility and the language freedom  can give some troubles to use it in scalable way. Here is where Typescript comes. Typescript are all those rules that help us to make scalable, readable and maintable code easily.

**Note**: This documentation is not a introduction to Programming, it only contains the diferences between Javascript and Typescript and how to use it. If you need deep into some theme we encourage you to read the Javascript docs ES5 and ES6, it'll necessary to undersand better some concepts that you may see on this document.


###  1.3. <a name='Install'></a>Install
To be independent of any SO on this documentation is assumed that you have installed NodeJS also the node and npm commands works as on your terminal.

```shell
> npm install -g typescript
```

Now you have installed the typescript compiler.

###  1.4. <a name='CompileAFile'></a>Compile A File <commit_msg>Typo corrections<commit_after><!-- vscode-markdown-toc -->
* 1. [Introduction.](#Introduction.)
	* 1.1. [What it is?](#Whatitis)
	* 1.2. [Why to use it?](#Whytouseit)
	* 1.3. [Install](#Install)
	* 1.4. [Compile A File](#CompileAFile)
* 2. [Types.](#Types.)
	* 2.1. [Enum](#Enum)
	* 2.2. [Any](#Any)
	* 2.3. [Void](#Void)
	* 2.4. [Null and Undefined](#NullandUndefined)
	* 2.5. [Never](#Never)
* 3. [`readonly` vs `const`](#readonlyvsconst)
* 4. [Implementing an interface](#Implementinganinterface)
* 5. [Difference between the static and instance sides of classes](#Differencebetweenthestaticandinstancesidesofclasses)
* 6. [Public by default](#Publicbydefault)
* 7. [Understanding `private`](#Understandingprivate)
* 8. [Understanding `protected`](#Understandingprotected)
* 9. [Parameter properties](#Parameterproperties)
* 10. [Constructor functions](#Constructorfunctions)
* 11. [Using a class as an interface](#Usingaclassasaninterface)
* 12. [Exporting a declaration](#Exportingadeclaration)
* 13. [Export statements](#Exportstatements)
* 14. [Re-exports](#Re-exports)
* 15. [Import a single export from a module](#Importasingleexportfromamodule)
* 16. [Import the entire module into a single variable, and use it to access the module exports](#Importtheentiremoduleintoasinglevariableanduseittoaccessthemoduleexports)
* 17. [Import a module for side-effects only](#Importamoduleforside-effectsonly)
* 18. [Ambient Modules](#AmbientModules)
	* 18.1. [Shorthand ambient modules](#Shorthandambientmodules)
	* 18.2. [Wildcard module declarations](#Wildcardmoduledeclarations)
	* 18.3. [UMD modules](#UMDmodules)
* 19. [Export as close to top-level as possible](#Exportasclosetotop-levelaspossible)
	* 19.1. [If you're only exporting a single `class` or `function`, use `export default`](#Ifyoureonlyexportingasingleclassorfunctionuseexportdefault)
		* 19.1.1. [MyClass.ts](#MyClass.ts)
		* 19.1.2. [MyFunc.ts](#MyFunc.ts)
		* 19.1.3. [Consumer.ts](#Consumer.ts)
	* 19.2. [If you're exporting multiple objects, put them all at top-level](#Ifyoureexportingmultipleobjectsputthemallattop-level)
		* 19.2.1. [MyThings.ts](#MyThings.ts)
	* 19.3. [Explicitly list imported names](#Explicitlylistimportednames)
		* 19.3.1. [Consumer.ts](#Consumer.ts-1)
	* 19.4. [Use the namespace import pattern if you're importing a large number of things](#Usethenamespaceimportpatternifyoureimportingalargenumberofthings)
		* 19.4.1. [MyLargeModule.ts](#MyLargeModule.ts)
		* 19.4.2. [Consumer.ts](#Consumer.ts-1)
* 20. [Re-export to extend](#Re-exporttoextend)
		* 20.1. [Calculator.ts](#Calculator.ts)
		* 20.2. [TestCalculator.ts](#TestCalculator.ts)
		* 20.3. [ProgrammerCalculator.ts](#ProgrammerCalculator.ts)
		* 20.4. [TestProgrammerCalculator.ts](#TestProgrammerCalculator.ts)
* 21. [Do not use namespaces in modules](#Donotusenamespacesinmodules)
* 22. [Red Flags](#RedFlags)

<!-- vscode-markdown-toc-config
	numbering=true
	autoSave=true
	/vscode-markdown-toc-config -->
<!-- /vscode-markdown-toc -->
# Typescript 


##  1. <a name='Introduction.'></a>Introduction.
###  1.1. <a name='Whatitis'></a>What is it?
Typescript it's a language that compiles into Javascript and try to prevent some of the most common issues made by the developers in the work time and add some of the new ecma standards to JS even though it's not completely supported by all browsers. 


###  1.2. <a name='Whytouseit'></a>Why to use it?
Javascript was made originally to add some web page interactivity. Now Javascript it's the core language for the frontend development and some project like nodeJS and derivates and it have a lot of applications like web app servers, IoT, or drones manipulation etc.

Now the use of JS have good and bad parts some times those are the same. The loose of types the versatility, flexibility and the language freedom  can give some troubles to use it in scalable way. Here is where Typescript comes. Typescript are all those rules that help us to make scalable, readable and maintable code easily.

**Note**: This documentation is not a introduction to Programming, it only contains the diferences between Javascript and Typescript and how to use it. If you need deep into some theme we encourage you to read the Javascript docs ES5 and ES6, it'll necessary to undersand better some concepts that you may see on this document.


###  1.3. <a name='Install'></a>Install
To be independent of any SO on this documentation is assumed that you have installed NodeJS also the node and npm commands works as on your terminal.

```shell
> npm install -g typescript
```

Now you have installed the typescript compiler.

###  1.4. <a name='CompileAFile'></a>Compile A File 
{'fraction_non_alphanumeric': 0.12359430223840634, 'fraction_numerical': 0.02720359858626968, 'mean_word_length': 4.985897435897436, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5133581', 'n_tokens_mistral': 3269, 'n_tokens_neox': 2848, 'n_words': 969}