<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://training-course-material.com/index.php?action=history&amp;feed=atom&amp;title=Advanced_Typescript</id>
	<title>Advanced Typescript - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://training-course-material.com/index.php?action=history&amp;feed=atom&amp;title=Advanced_Typescript"/>
	<link rel="alternate" type="text/html" href="https://training-course-material.com/index.php?title=Advanced_Typescript&amp;action=history"/>
	<updated>2026-05-13T23:38:46Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://training-course-material.com/index.php?title=Advanced_Typescript&amp;diff=89046&amp;oldid=prev</id>
		<title>Lsokolowski1 at 14:47, 29 August 2025</title>
		<link rel="alternate" type="text/html" href="https://training-course-material.com/index.php?title=Advanced_Typescript&amp;diff=89046&amp;oldid=prev"/>
		<updated>2025-08-29T14:47:45Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:47, 29 August 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l2&quot;&gt;Line 2:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 2:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;slideshow style=&quot;nobleprog&quot; headingmark=&quot;⌘&quot; incmark=&quot;…&quot; scaled=&quot;true&quot; font=&quot;Trebuchet MS&quot; &amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;title: Advanced Typescript Training Course&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;title: Advanced Typescript Training Course&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;author: Łukasz Sokołowski&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;author: Łukasz Sokołowski&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/slideshow&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lsokolowski1</name></author>
	</entry>
	<entry>
		<id>https://training-course-material.com/index.php?title=Advanced_Typescript&amp;diff=88205&amp;oldid=prev</id>
		<title>Lsokolowski1 at 13:47, 17 June 2024</title>
		<link rel="alternate" type="text/html" href="https://training-course-material.com/index.php?title=Advanced_Typescript&amp;diff=88205&amp;oldid=prev"/>
		<updated>2024-06-17T13:47:40Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://training-course-material.com/index.php?title=Advanced_Typescript&amp;amp;diff=88205&amp;amp;oldid=87906&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Lsokolowski1</name></author>
	</entry>
	<entry>
		<id>https://training-course-material.com/index.php?title=Advanced_Typescript&amp;diff=87906&amp;oldid=prev</id>
		<title>Lsokolowski1: /* Importing non-code assets ⌘ */</title>
		<link rel="alternate" type="text/html" href="https://training-course-material.com/index.php?title=Advanced_Typescript&amp;diff=87906&amp;oldid=prev"/>
		<updated>2024-03-26T13:24:32Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Importing non-code assets ⌘&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 13:24, 26 March 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l106&quot;&gt;Line 106:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 106:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Same concept applies to other assets - CSS, SCSS, JSON, etc&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Same concept applies to other assets - CSS, SCSS, JSON, etc&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &#039;&#039;&#039;Exercise&#039;&#039;&#039; - setup for &#039;&#039;.jpg&#039;&#039; and add &#039;&#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;bearHigh5&lt;/del&gt;.jpg&#039;&#039; in our &#039;&#039;div&#039;&#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &#039;&#039;&#039;Exercise&#039;&#039;&#039; - setup for &#039;&#039;.jpg&#039;&#039; and add &#039;&#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;bear&lt;/ins&gt;.jpg&#039;&#039; in our &#039;&#039;div&#039;&#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** &amp;#039;&amp;#039;webpack.config.js&amp;#039;&amp;#039; - add this to &amp;#039;&amp;#039;&amp;#039;rules&amp;#039;&amp;#039;&amp;#039; array&amp;lt;syntaxhighlight lang=&amp;quot;js&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** &amp;#039;&amp;#039;webpack.config.js&amp;#039;&amp;#039; - add this to &amp;#039;&amp;#039;&amp;#039;rules&amp;#039;&amp;#039;&amp;#039; array&amp;lt;syntaxhighlight lang=&amp;quot;js&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lsokolowski1</name></author>
	</entry>
	<entry>
		<id>https://training-course-material.com/index.php?title=Advanced_Typescript&amp;diff=87730&amp;oldid=prev</id>
		<title>Lsokolowski1: /* Building the application ⌘ */</title>
		<link rel="alternate" type="text/html" href="https://training-course-material.com/index.php?title=Advanced_Typescript&amp;diff=87730&amp;oldid=prev"/>
		<updated>2023-10-01T16:37:41Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Building the application ⌘&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:37, 1 October 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l130&quot;&gt;Line 130:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 130:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;npm run build&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;npm run build&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;npm run start&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;npm run start&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &#039;&#039;&#039;Homework&#039;&#039;&#039;: read carefully &#039;npm run build&#039; result messages&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &#039;&#039;&#039;Homework&#039;&#039;&#039;: read carefully &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;&lt;/ins&gt;&#039;npm run build&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;&lt;/ins&gt;&#039; result messages&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** add &amp;#039;&amp;#039;lazy loading&amp;#039;&amp;#039; via import()&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** add &amp;#039;&amp;#039;lazy loading&amp;#039;&amp;#039; via import()&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** improve it with &amp;#039;&amp;#039;async-await&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** improve it with &amp;#039;&amp;#039;async-await&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lsokolowski1</name></author>
	</entry>
	<entry>
		<id>https://training-course-material.com/index.php?title=Advanced_Typescript&amp;diff=87729&amp;oldid=prev</id>
		<title>Lsokolowski1: /* Building the application ⌘ */</title>
		<link rel="alternate" type="text/html" href="https://training-course-material.com/index.php?title=Advanced_Typescript&amp;diff=87729&amp;oldid=prev"/>
		<updated>2023-10-01T16:37:10Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Building the application ⌘&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:37, 1 October 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l130&quot;&gt;Line 130:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 130:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;npm run build&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;npm run build&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;npm run start&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;npm run start&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &#039;&#039;&#039;Homework&#039;&#039;&#039;: read carefully &#039;npm run build&#039; result messages&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;** add &#039;&#039;lazy loading&#039;&#039; via import()&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;** improve it with &#039;&#039;async-await&#039;&#039;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Creating Custom Data Types ⌘==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Creating Custom Data Types ⌘==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lsokolowski1</name></author>
	</entry>
	<entry>
		<id>https://training-course-material.com/index.php?title=Advanced_Typescript&amp;diff=87728&amp;oldid=prev</id>
		<title>Lsokolowski1: /* Configuring Webpack and TypeScript ⌘ */</title>
		<link rel="alternate" type="text/html" href="https://training-course-material.com/index.php?title=Advanced_Typescript&amp;diff=87728&amp;oldid=prev"/>
		<updated>2023-10-01T15:15:11Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Configuring Webpack and TypeScript ⌘&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:15, 1 October 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l75&quot;&gt;Line 75:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 75:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   },&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   },&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   output: {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   output: {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     filename: &#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;bundle&lt;/del&gt;.js&#039;,&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     filename: &#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;main&lt;/ins&gt;.js&#039;,&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     path: path.resolve(__dirname, &amp;#039;dist&amp;#039;),&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     path: path.resolve(__dirname, &amp;#039;dist&amp;#039;),&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   },&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   },&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lsokolowski1</name></author>
	</entry>
	<entry>
		<id>https://training-course-material.com/index.php?title=Advanced_Typescript&amp;diff=87727&amp;oldid=prev</id>
		<title>Lsokolowski1: /* Importing non-code assets ⌘ */</title>
		<link rel="alternate" type="text/html" href="https://training-course-material.com/index.php?title=Advanced_Typescript&amp;diff=87727&amp;oldid=prev"/>
		<updated>2023-10-01T15:10:27Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Importing non-code assets ⌘&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:10, 1 October 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l115&quot;&gt;Line 115:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 115:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** &amp;#039;&amp;#039;index.ts&amp;#039;&amp;#039; - new image element&amp;lt;syntaxhighlight lang=&amp;quot;js&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** &amp;#039;&amp;#039;index.ts&amp;#039;&amp;#039; - new image element&amp;lt;syntaxhighlight lang=&amp;quot;js&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     //// at the top&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     //// at the top&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     import MyBear from &#039;./&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;bearHigh5&lt;/del&gt;.jpg&#039;;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     import MyBear from &#039;./&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;bear&lt;/ins&gt;.jpg&#039;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     (...)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     (...)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     //// in &amp;#039;component()&amp;#039; function&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     //// in &amp;#039;component()&amp;#039; function&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lsokolowski1</name></author>
	</entry>
	<entry>
		<id>https://training-course-material.com/index.php?title=Advanced_Typescript&amp;diff=85836&amp;oldid=prev</id>
		<title>Lsokolowski at 09:24, 9 May 2022</title>
		<link rel="alternate" type="text/html" href="https://training-course-material.com/index.php?title=Advanced_Typescript&amp;diff=85836&amp;oldid=prev"/>
		<updated>2022-05-09T09:24:01Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Cat|JavaScript}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;slideshow style=&amp;quot;nobleprog&amp;quot; headingmark=&amp;quot;⌘&amp;quot; incmark=&amp;quot;…&amp;quot; scaled=&amp;quot;true&amp;quot; font=&amp;quot;Trebuchet MS&amp;quot; &amp;gt;&lt;br /&gt;
;title: Advanced Typescript Training Course&lt;br /&gt;
;author: Łukasz Sokołowski&lt;br /&gt;
&amp;lt;/slideshow&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Advanced Typescript ==&lt;br /&gt;
Advanced Typescript Training Materials&lt;br /&gt;
&lt;br /&gt;
{{Can I use your material}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ⌘==&lt;br /&gt;
* Overview of [[Typescript#Closing_remarks_.E2.8C.98|TypeScript]] features and advantages&lt;br /&gt;
* Programming best practices and tips&lt;br /&gt;
** We&amp;#039;ll cover some of them during the day&lt;br /&gt;
&lt;br /&gt;
== Getting Started ⌘==&lt;br /&gt;
* Installing TypeScript, Nodejs, and Visual Studio Code&lt;br /&gt;
* Initializing the server&lt;br /&gt;
* Configuring access modifiers and compiler options&lt;br /&gt;
* Setting up a Node.js project&lt;br /&gt;
* Building and debugging Node.js TypeScript&lt;br /&gt;
&lt;br /&gt;
=== Configuring access modifiers and compiler options ⌘===&lt;br /&gt;
* Example with Angular - &amp;#039;&amp;#039;jwt&amp;#039;&amp;#039;&lt;br /&gt;
* Related docs - &amp;#039;&amp;#039;aka.ms/tsconfig.json&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=== Setting up a Node.js project ⌘===&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Example&amp;#039;&amp;#039;&amp;#039; - &amp;#039;&amp;#039;other_/node_/&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== Configuring Webpack and TypeScript ⌘==&lt;br /&gt;
* Enabling source maps&lt;br /&gt;
* Using third-party libraries&lt;br /&gt;
* Importing non-code assets&lt;br /&gt;
* Building the application&lt;br /&gt;
&lt;br /&gt;
=== Initial setup ⌘===&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Exercise&amp;#039;&amp;#039;&amp;#039; - &amp;#039;&amp;#039;webpack_/with_ts&amp;#039;&amp;#039;&lt;br /&gt;
* Compiler and loader&lt;br /&gt;
** &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;npm install --save-dev typescript ts-loader&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Directories and configuration&lt;br /&gt;
** &amp;#039;&amp;#039;index.ts&amp;#039;&amp;#039; - new file with content from &amp;#039;index.js&amp;#039; and change first line: &amp;lt;syntaxhighlight lang=&amp;quot;js&amp;quot; inline&amp;gt;import * as _ from &amp;#039;lodash&amp;#039;;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
** &amp;#039;&amp;#039;tsconfig.json&amp;#039;&amp;#039; - &amp;#039;tsc --init&amp;#039; and later apply these changes&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;compilerOptions&amp;quot;: {&lt;br /&gt;
    &amp;quot;outDir&amp;quot;: &amp;quot;./dist/&amp;quot;,&lt;br /&gt;
    &amp;quot;noImplicitAny&amp;quot;: true,&lt;br /&gt;
    &amp;quot;module&amp;quot;: &amp;quot;es6&amp;quot;,&lt;br /&gt;
    &amp;quot;target&amp;quot;: &amp;quot;es5&amp;quot;,&lt;br /&gt;
    &amp;quot;jsx&amp;quot;: &amp;quot;react&amp;quot;,&lt;br /&gt;
    &amp;quot;allowJs&amp;quot;: true,&lt;br /&gt;
    &amp;quot;moduleResolution&amp;quot;: &amp;quot;node&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
** &amp;#039;&amp;#039;webpack.config.js&amp;#039;&amp;#039;&amp;lt;syntaxhighlight lang=&amp;quot;js&amp;quot;&amp;gt;&lt;br /&gt;
const path = require(&amp;#039;path&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
module.exports = {&lt;br /&gt;
  entry: &amp;#039;./src/index.ts&amp;#039;,&lt;br /&gt;
  module: {&lt;br /&gt;
    rules: [&lt;br /&gt;
      {&lt;br /&gt;
        test: /\.tsx?$/,&lt;br /&gt;
        use: &amp;#039;ts-loader&amp;#039;,&lt;br /&gt;
        exclude: /node_modules/,&lt;br /&gt;
      },&lt;br /&gt;
    ],&lt;br /&gt;
  },&lt;br /&gt;
  resolve: {&lt;br /&gt;
    extensions: [&amp;#039;.tsx&amp;#039;, &amp;#039;.ts&amp;#039;, &amp;#039;.js&amp;#039;],&lt;br /&gt;
  },&lt;br /&gt;
  output: {&lt;br /&gt;
    filename: &amp;#039;bundle.js&amp;#039;,&lt;br /&gt;
    path: path.resolve(__dirname, &amp;#039;dist&amp;#039;),&lt;br /&gt;
  },&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enabling source maps ⌘===&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Exercise&amp;#039;&amp;#039;&amp;#039; - &amp;#039;&amp;#039;webpack_/with_ts&amp;#039;&amp;#039;&lt;br /&gt;
* TypeScript will output inline source maps to our compiled JavaScript files&lt;br /&gt;
* &amp;#039;&amp;#039;tsconfig.json&amp;#039;&amp;#039; - uncomment line with &amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot; inline&amp;gt;&amp;quot;sourceMap&amp;quot;: true,&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Telling webpack to &amp;#039;&amp;#039;&amp;#039;extract&amp;#039;&amp;#039;&amp;#039; source maps and &amp;#039;&amp;#039;&amp;#039;include&amp;#039;&amp;#039;&amp;#039; in final bundle&lt;br /&gt;
** &amp;#039;&amp;#039;webpack.config.js&amp;#039;&amp;#039; - put this just below &amp;#039;&amp;#039;&amp;#039;entry:&amp;#039;&amp;#039;&amp;#039; &amp;lt;syntaxhighlight lang=&amp;quot;js&amp;quot; inline&amp;gt;devtool: &amp;#039;inline-source-map&amp;#039;,&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using third-party libraries ⌘===&lt;br /&gt;
* When installing new lib from &amp;#039;&amp;#039;&amp;#039;npm&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
** Always remember to install it&amp;#039;s &amp;#039;&amp;#039;&amp;#039;typing definition&amp;#039;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;.d.ts&amp;#039;&amp;#039; files)&lt;br /&gt;
** Definitions can be found here [https://www.typescriptlang.org/dt/search?search= Types for TS]&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Example&amp;#039;&amp;#039;&amp;#039; - &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;npm install --save-dev @types/lodash&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Exercise&amp;#039;&amp;#039;&amp;#039; - install &amp;#039;&amp;#039;jquery&amp;#039;&amp;#039; with it&amp;#039;s typings&lt;br /&gt;
** when we &amp;#039;&amp;#039;&amp;#039;click&amp;#039;&amp;#039;&amp;#039; on our &amp;#039;&amp;#039;div&amp;#039;&amp;#039; it should shout with popup: &amp;quot;TS rulezzzzz!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Importing non-code assets ⌘===&lt;br /&gt;
* We need to &amp;#039;&amp;#039;&amp;#039;defer&amp;#039;&amp;#039;&amp;#039; the type&lt;br /&gt;
** &amp;#039;&amp;#039;custom.d.ts&amp;#039;&amp;#039; - new file&lt;br /&gt;
** example setup for &amp;#039;&amp;#039;.svg&amp;#039;&amp;#039;&amp;lt;syntaxhighlight lang=&amp;quot;ts&amp;quot;&amp;gt;&lt;br /&gt;
declare module &amp;#039;*.svg&amp;#039; {&lt;br /&gt;
  const content: any;&lt;br /&gt;
  export default content;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Same concept applies to other assets - CSS, SCSS, JSON, etc&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Exercise&amp;#039;&amp;#039;&amp;#039; - setup for &amp;#039;&amp;#039;.jpg&amp;#039;&amp;#039; and add &amp;#039;&amp;#039;bearHigh5.jpg&amp;#039;&amp;#039; in our &amp;#039;&amp;#039;div&amp;#039;&amp;#039;&lt;br /&gt;
** &amp;#039;&amp;#039;webpack.config.js&amp;#039;&amp;#039; - add this to &amp;#039;&amp;#039;&amp;#039;rules&amp;#039;&amp;#039;&amp;#039; array&amp;lt;syntaxhighlight lang=&amp;quot;js&amp;quot;&amp;gt;&lt;br /&gt;
      {&lt;br /&gt;
        test: /\.(png|svg|jpg|jpeg|gif)$/i,&lt;br /&gt;
        type: &amp;#039;asset/resource&amp;#039;,&lt;br /&gt;
      },&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
** &amp;#039;&amp;#039;index.ts&amp;#039;&amp;#039; - new image element&amp;lt;syntaxhighlight lang=&amp;quot;js&amp;quot;&amp;gt;&lt;br /&gt;
    //// at the top&lt;br /&gt;
    import MyBear from &amp;#039;./bearHigh5.jpg&amp;#039;;&lt;br /&gt;
    (...)&lt;br /&gt;
    //// in &amp;#039;component()&amp;#039; function&lt;br /&gt;
    // Add the image to our existing div&lt;br /&gt;
    const myIcon = new Image();&lt;br /&gt;
    myIcon.src = MyBear;&lt;br /&gt;
&lt;br /&gt;
    element.appendChild(myIcon);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Building the application ⌘===&lt;br /&gt;
* Some good practices (performance, etc)&lt;br /&gt;
** https://webpack.js.org/guides/build-performance/#typescript-loader&lt;br /&gt;
* &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;npm run build&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;npm run start&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating Custom Data Types ⌘==&lt;br /&gt;
* Union, Intersection, and Tuple Types&lt;br /&gt;
* Type Guards, Type Casting, and Type Assertions&lt;br /&gt;
* Creating arrays for custom types&lt;br /&gt;
* Other types and examples&lt;br /&gt;
&lt;br /&gt;
=== Custom Data Types ⌘===&lt;br /&gt;
* Usually a &amp;#039;&amp;#039;&amp;#039;combination&amp;#039;&amp;#039;&amp;#039; of primitive types (strings, numbers, Booleans) with &amp;#039;&amp;#039;&amp;#039;objects&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* Building blocks of advanced types – &amp;#039;&amp;#039;&amp;#039;type alias&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;string&amp;#039;&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;&amp;#039;number literals&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* Allow to write code&lt;br /&gt;
** &amp;#039;&amp;#039;&amp;#039;easier to understand&amp;#039;&amp;#039;&amp;#039; for myself and &amp;#039;&amp;#039;&amp;#039;easier to work with&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
** and for any &amp;#039;&amp;#039;&amp;#039;others&amp;#039;&amp;#039;&amp;#039; working with me &lt;br /&gt;
** or those who are &amp;#039;&amp;#039;&amp;#039;inheriting&amp;#039;&amp;#039;&amp;#039; the project&lt;br /&gt;
* Oftenly web applications become more complex&lt;br /&gt;
** it is necessary to be able to &amp;#039;&amp;#039;&amp;#039;model&amp;#039;&amp;#039;&amp;#039; that complexity&lt;br /&gt;
** TypeScript makes that easy with advanced types&lt;br /&gt;
** types that are &amp;#039;&amp;#039;&amp;#039;conditional&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;flexible&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=== Type Aliases ⌘===&lt;br /&gt;
* Allow to declare &amp;#039;&amp;#039;&amp;#039;references&amp;#039;&amp;#039;&amp;#039; to any type – advanced or primitive&lt;br /&gt;
* Make code &amp;#039;&amp;#039;&amp;#039;easier&amp;#039;&amp;#039;&amp;#039; to read - allow to be &amp;#039;&amp;#039;&amp;#039;less verbose&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* We &amp;#039;&amp;#039;&amp;#039;declare&amp;#039;&amp;#039;&amp;#039; our type once and &amp;#039;&amp;#039;&amp;#039;reuse&amp;#039;&amp;#039;&amp;#039; it throughout application&lt;br /&gt;
* Code is more readable and maintainable&lt;br /&gt;
* &amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039; &amp;lt;syntaxhighlight inline lang=&amp;quot;ts&amp;quot;&amp;gt;type OnlyStrings = string;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
** The &amp;#039;&amp;#039;&amp;#039;type&amp;#039;&amp;#039;&amp;#039; keyword is followed by the alias, &amp;#039;&amp;#039;OnlyStrings&amp;#039;&amp;#039;, and then the &amp;#039;&amp;#039;&amp;#039;string&amp;#039;&amp;#039;&amp;#039; type&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Exercise&amp;#039;&amp;#039;&amp;#039; - &amp;#039;&amp;#039;customdt_/exerc_/ex1&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=== Type Literals ⌘===&lt;br /&gt;
* Allow to create a type based on a &amp;#039;&amp;#039;&amp;#039;specific&amp;#039;&amp;#039;&amp;#039; string or number&lt;br /&gt;
* Not very useful in itself, but with more complex types such as &amp;#039;&amp;#039;&amp;#039;union&amp;#039;&amp;#039;&amp;#039; types&lt;br /&gt;
* &amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039; &amp;lt;syntaxhighlight inline lang=&amp;quot;ts&amp;quot;&amp;gt;type Success = 200;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Example&amp;#039;&amp;#039;&amp;#039; - &amp;#039;&amp;#039;customdt_/examp_/e2&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Exercise&amp;#039;&amp;#039;&amp;#039; - &amp;#039;&amp;#039;customdt_/exerc_/ex2&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=== Intersection ⌘===&lt;br /&gt;
* Allows to &amp;#039;&amp;#039;&amp;#039;combine&amp;#039;&amp;#039;&amp;#039; types to form a &amp;#039;&amp;#039;&amp;#039;new type&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
** with the properties of the combined types &lt;br /&gt;
** it is an &amp;#039;&amp;#039;&amp;#039;and&amp;#039;&amp;#039;&amp;#039; type&lt;br /&gt;
* Similar to multi-class inheritance&lt;br /&gt;
** child object can have more than one parent object that it derives its properties from&lt;br /&gt;
* Helps to keep the cod DRY (Don&amp;#039;t Repeat Yourself)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Merged properties&amp;#039;&amp;#039;&amp;#039; should be of the &amp;#039;&amp;#039;&amp;#039;same type&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039; &amp;lt;syntaxhighlight inline lang=&amp;quot;ts&amp;quot;&amp;gt;type CourseEvaluation = TrainingEvaluationForm &amp;amp; CourseEventEvaluationByTrainer;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Example&amp;#039;&amp;#039;&amp;#039; - &amp;#039;&amp;#039;customdt_/examp_/e3&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Exercise&amp;#039;&amp;#039;&amp;#039; - &amp;#039;&amp;#039;customdt_/exerc_/ex3&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=== Union ⌘===&lt;br /&gt;
* Similar to intersection&lt;br /&gt;
** but it is an &amp;#039;&amp;#039;&amp;#039;or&amp;#039;&amp;#039;&amp;#039; type&lt;br /&gt;
** do not merges types&lt;br /&gt;
* Similar to the ternary operator in JavaScript&lt;br /&gt;
** types are separated by the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; (pipe)&lt;br /&gt;
* &amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039; &amp;lt;syntaxhighlight inline lang=&amp;quot;ts&amp;quot;&amp;gt;type Lead = General | Price | Course;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Example&amp;#039;&amp;#039;&amp;#039; - &amp;#039;&amp;#039;customdt_/examp_/e4&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Exercise&amp;#039;&amp;#039;&amp;#039; - &amp;#039;&amp;#039;customdt_/exerc_/ex4&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=== Index Types ⌘===&lt;br /&gt;
* Allow to create objects with &amp;#039;&amp;#039;&amp;#039;flexible&amp;#039;&amp;#039;&amp;#039; number of &amp;#039;&amp;#039;&amp;#039;properties&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
** We define a &amp;#039;&amp;#039;&amp;#039;signature&amp;#039;&amp;#039;&amp;#039; for our type using an &amp;#039;&amp;#039;&amp;#039;interface&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039; &amp;lt;syntaxhighlight inline lang=&amp;quot;ts&amp;quot;&amp;gt;[ msg: number ]: string;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Example&amp;#039;&amp;#039;&amp;#039; - &amp;#039;&amp;#039;customdt_/examp_/e5&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Exercise&amp;#039;&amp;#039;&amp;#039; - &amp;#039;&amp;#039;customdt_/exerc_/ex5&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=== Tuple ⌘===&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Array&amp;#039;&amp;#039;&amp;#039; which contains &amp;#039;&amp;#039;&amp;#039;multiple&amp;#039;&amp;#039;&amp;#039; types&lt;br /&gt;
** fixed indexed order - the &amp;#039;&amp;#039;&amp;#039;order&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;length&amp;#039;&amp;#039;&amp;#039; are &amp;#039;&amp;#039;&amp;#039;guaranteed&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
** data is connected with &amp;#039;&amp;#039;&amp;#039;less&amp;#039;&amp;#039;&amp;#039; syntax than &amp;#039;&amp;#039;keyed objects&amp;#039;&amp;#039;&lt;br /&gt;
* A good pattern for short bits of connected data or for &amp;#039;&amp;#039;&amp;#039;fixtures&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* Example from &amp;#039;Reactjs&amp;#039; - &amp;#039;&amp;#039;useState&amp;#039;&amp;#039; returns a tuple of the value and a setter function&lt;br /&gt;
* &amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039; &amp;lt;syntaxhighlight inline lang=&amp;quot;ts&amp;quot;&amp;gt;const closedLead: [Invoice, Payment] = [&amp;quot;Consultancy23032021&amp;quot;, {paid:1, paymentType:&amp;quot;transfer&amp;quot;} ];&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Example&amp;#039;&amp;#039;&amp;#039; - &amp;#039;&amp;#039;customdt_/examp_/e6&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Exercise&amp;#039;&amp;#039;&amp;#039; - &amp;#039;&amp;#039;customdt_/exerc_/ex6&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=== Type Guards ⌘===&lt;br /&gt;
* Participate in the &amp;#039;&amp;#039;&amp;#039;code flow analysis&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
** We &amp;#039;&amp;#039;&amp;#039;influence&amp;#039;&amp;#039;&amp;#039; the code flow&lt;br /&gt;
* TS uses existing JS behavior which validates our objects at &amp;#039;&amp;#039;&amp;#039;runtime&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* We can prep also custom functions - &amp;#039;&amp;#039;&amp;#039;type predicate functions&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;#039;&amp;#039;Syntax/operators&amp;#039;&amp;#039; - &amp;#039;&amp;#039;&amp;#039;in, instanceof, typeof, is&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
** Full list of possible typeof values developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Example&amp;#039;&amp;#039;&amp;#039; - &amp;#039;&amp;#039;customdt_/examp_/e7&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Exercise&amp;#039;&amp;#039;&amp;#039; - &amp;#039;&amp;#039;customdt_/exerc_/ex7&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=== Type Casting, Assertions ⌘===&lt;br /&gt;
Two syntaxes&lt;br /&gt;
* xml &amp;#039;&amp;#039;&amp;#039;&amp;lt;&amp;gt;&amp;#039;&amp;#039;&amp;#039; - this way won&amp;#039;t work with JSX (.tsx, etc.) and Reactjs&lt;br /&gt;
** [[Typescript#Assertions_.E2.8C.98|Assertions]]&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;... as ...&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
** [[Typescript#Const_for_objects.2C_fixes_.E2.8C.98|Casting with &amp;#039;as&amp;#039;]]&lt;br /&gt;
&lt;br /&gt;
=== Generics ⌘===&lt;br /&gt;
* [[Typescript#Generics_.E2.8C.98|Generics basics]]&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Example&amp;#039;&amp;#039;&amp;#039; - &amp;#039;&amp;#039;customdt_/examp_/e8_&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Exercise&amp;#039;&amp;#039;&amp;#039; - together with &amp;#039;Conditional Types&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=== Conditional Types ⌘===&lt;br /&gt;
* Allow &amp;#039;&amp;#039;&amp;#039;complex&amp;#039;&amp;#039;&amp;#039; type expressions&lt;br /&gt;
** drive some of the &amp;#039;&amp;#039;&amp;#039;built-in&amp;#039;&amp;#039;&amp;#039; types&lt;br /&gt;
* Really powerful - allow to write &amp;#039;&amp;#039;&amp;#039;logic inside our types&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* Similar to the regular JS &amp;#039;&amp;#039;&amp;#039;ternary&amp;#039;&amp;#039;&amp;#039; operator (inline conditions)&lt;br /&gt;
** differences: in the syntax (extends keyword), check is done at compile time and not runtime&lt;br /&gt;
* &amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039; &amp;lt;syntaxhighlight inline lang=&amp;quot;ts&amp;quot;&amp;gt;T extends U ? X : Y&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Example&amp;#039;&amp;#039;&amp;#039; - &amp;#039;&amp;#039;customdt_/exerc_/e9&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Exercise&amp;#039;&amp;#039;&amp;#039; - &amp;#039;&amp;#039;customdt_/exerc_/ex8_9&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== Applying Decorators ⌘==&lt;br /&gt;
* Enabling decorators&lt;br /&gt;
* Creating class, parameter, and method decorators&lt;br /&gt;
* Using property descriptors&lt;br /&gt;
* Using metadata&lt;br /&gt;
&lt;br /&gt;
=== Reflection, tightly coupled with ⌘===&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Reflection&amp;#039;&amp;#039;&amp;#039; is the capability of a certain piece of code to &amp;#039;&amp;#039;&amp;#039;examine&amp;#039;&amp;#039;&amp;#039; and be introspective about itself (navel-gazing)&lt;br /&gt;
** a piece of code can have &amp;#039;&amp;#039;&amp;#039;access&amp;#039;&amp;#039;&amp;#039; to things such as the &amp;#039;&amp;#039;&amp;#039;variables&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;functions&amp;#039;&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;&amp;#039;classes&amp;#039;&amp;#039;&amp;#039; defined inside it&lt;br /&gt;
* Most languages provide some kind of reflection API that enables us to &amp;#039;&amp;#039;&amp;#039;treat the code itself as if it was data&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
** TypeScript is built upon JavaScript - inherits the JavaScript reflection capabilities&lt;br /&gt;
&lt;br /&gt;
=== Decorators intro ⌘===&lt;br /&gt;
* Decorators (&amp;#039;&amp;#039;from js proposal&amp;#039;&amp;#039;)&lt;br /&gt;
** can be used to &amp;#039;&amp;#039;&amp;#039;metaprogram&amp;#039;&amp;#039;&amp;#039; and add functionality to a &amp;#039;&amp;#039;&amp;#039;value&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
** &amp;#039;&amp;#039;&amp;#039;without fundamentally changing&amp;#039;&amp;#039;&amp;#039; its external behavior&lt;br /&gt;
* Have three primary capabilities&lt;br /&gt;
** Can &amp;#039;&amp;#039;&amp;#039;replace&amp;#039;&amp;#039;&amp;#039; the value that is being decorated with a matching value that has the same semantics&lt;br /&gt;
*** e.g. a method with another method, a field with another field, a class with another class, etc&lt;br /&gt;
** Can provide &amp;#039;&amp;#039;&amp;#039;access&amp;#039;&amp;#039;&amp;#039; to the value that is being decorated via &amp;#039;&amp;#039;&amp;#039;accessor&amp;#039;&amp;#039;&amp;#039; functions (can be shared)&lt;br /&gt;
** Can &amp;#039;&amp;#039;&amp;#039;initialize&amp;#039;&amp;#039;&amp;#039; the value that is being decorated, running &amp;#039;&amp;#039;&amp;#039;additional&amp;#039;&amp;#039;&amp;#039; code &amp;#039;&amp;#039;&amp;#039;after&amp;#039;&amp;#039;&amp;#039; the value has been fully defined&lt;br /&gt;
*** when the value is a member of class, initialized once per instance&lt;br /&gt;
&lt;br /&gt;
=== Decorators intro con&amp;#039;t ⌘===&lt;br /&gt;
* Special kind of &amp;#039;&amp;#039;&amp;#039;declaration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* Can be &amp;#039;&amp;#039;&amp;#039;attached&amp;#039;&amp;#039;&amp;#039; to &lt;br /&gt;
** &amp;#039;&amp;#039;&amp;#039;a class declaration, method, accessor, property, or parameter&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* Uses &amp;#039;&amp;#039;@expression&amp;#039;&amp;#039;&lt;br /&gt;
** expression must evaluate to a &amp;#039;&amp;#039;&amp;#039;function&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
** such function will be called at &amp;#039;&amp;#039;&amp;#039;runtime&amp;#039;&amp;#039;&amp;#039; with information about the decorated declaration&lt;br /&gt;
* To transpile&lt;br /&gt;
 tsc --target ES5 --experimentalDecorators&lt;br /&gt;
* tsconfig.json&lt;br /&gt;
 &amp;quot;experimentalDecorators&amp;quot;: true,                   /* Enable experimental support for TC39 stage 2 draft decorators. */&lt;br /&gt;
 &amp;quot;emitDecoratorMetadata&amp;quot;: true,                    /* Emit design-type metadata for decorated declarations in source files. */&lt;br /&gt;
&lt;br /&gt;
=== Decorator types, syntax ⌘===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ts&amp;quot;&amp;gt;&lt;br /&gt;
@ClassDecorator&lt;br /&gt;
class ExampleClass {&lt;br /&gt;
    @PropertyDecorator&lt;br /&gt;
    public exampleProperty:number = 0;&lt;br /&gt;
    private _exampleField: number = 0;&lt;br /&gt;
    @AccessorDecorator&lt;br /&gt;
    public get exampleField() { return this._exampleField; }&lt;br /&gt;
    @MethodDecorator&lt;br /&gt;
    public exampleMethod(@ParameterDecorator paramName: string) {}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//// &amp;#039;PascalCase&amp;#039; instead of &amp;#039;lowerCamelCase&amp;#039; &lt;br /&gt;
function ClassDecorator (constructor: Function) {}&lt;br /&gt;
function AccessorDecorator (target: any, propertyName: string, descriptor: PropertyDescriptor) {}&lt;br /&gt;
function MethodDecorator (target: any, propertyName: string, descriptor: PropertyDescriptor) {}&lt;br /&gt;
function PropertyDecorator (target: any, propertyName: string) {}&lt;br /&gt;
function ParameterDecorator (target: any, propertyName: string, parameterIndex: number) {}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Class Decorator ⌘===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ts&amp;quot;&amp;gt;&lt;br /&gt;
interface Invoice {&lt;br /&gt;
	id: string;&lt;br /&gt;
	clientId: number;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
interface HasNewProperty {&lt;br /&gt;
  newProp: string;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// decorator definition can look like this&lt;br /&gt;
function SignedInv&amp;lt;T extends {new(...args:any[]):{}}&amp;gt;(constructor:T) {&lt;br /&gt;
    // return class extends constructor {&lt;br /&gt;
      return class extends constructor implements HasNewProperty {&lt;br /&gt;
        newProp = &amp;quot;new prop&amp;quot;;&lt;br /&gt;
        invSign = &amp;quot;my_new_name_template&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Decorator &amp;#039;factory&amp;#039; - common practice to pass custom params&lt;br /&gt;
function InvoiceDescr(limit: number) { &lt;br /&gt;
  return function (constructor: Function) { &lt;br /&gt;
    constructor.prototype.invType = &amp;#039;Consultancy&amp;#039; + limit&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
@SignedInv&lt;br /&gt;
@InvoiceDescr(3)&lt;br /&gt;
class FranchiseeAccountancyTool {&lt;br /&gt;
	private _invoice;&lt;br /&gt;
        invSign: string;&lt;br /&gt;
&lt;br /&gt;
	constructor(public accToolKey: string, public taxRate: string) {&lt;br /&gt;
              this.invSign = accToolKey + &amp;#039;inv_code&amp;#039;;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	get invoice() {&lt;br /&gt;
		return this._invoice;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	set invoice(inv: Invoice) {&lt;br /&gt;
		this._invoice = inv;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
let franAcc = new FranchiseeAccountancyTool(&amp;#039;cnaj837tjdhsu#jd9_fd8&amp;#039;, &amp;#039;204&amp;#039;);&lt;br /&gt;
console.log(franAcc);&lt;br /&gt;
console.log(franAcc.invSign);&lt;br /&gt;
console.log(franAcc.newProp);&lt;br /&gt;
console.log(franAcc.invType);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Class Decorator examples ===&lt;br /&gt;
* &amp;#039;&amp;#039;decorators_&amp;#039;&amp;#039;&lt;br /&gt;
* In &amp;#039;Angular&amp;#039; application&lt;br /&gt;
** &amp;lt;small&amp;gt;[[Angular_2_Fundamentals#Example_1_.E2.8C.98]]&amp;lt;/small&amp;gt;&lt;br /&gt;
** jwt example - &amp;#039;&amp;#039;angular-login-jwt&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=== Decorator exercises ===&lt;br /&gt;
* Ex 1-5 (class, method, accessor)&lt;br /&gt;
* Act1&lt;br /&gt;
* Ex 6-8 (field, param)&lt;br /&gt;
** metadata, with &amp;#039;reflect-metadata&amp;#039; pollyfill-lib&lt;br /&gt;
* Act2&lt;br /&gt;
&lt;br /&gt;
== Implementing Asynchronous Code and APIs ⌘==&lt;br /&gt;
* Using callbacks, promises, and async/await&lt;br /&gt;
* Writing a REST API with Node.js and TypeScript&lt;br /&gt;
&amp;lt;!-- TODO * Testing APIs with Postman/SoapUI --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using callbacks, promises, and async/await ⌘===&lt;br /&gt;
* JavaScript runtime is &amp;#039;&amp;#039;&amp;#039;single threaded&amp;#039;&amp;#039;&amp;#039; (on both web browser and server via node)&lt;br /&gt;
** One, and only one, piece of code will be running at a particular time - &amp;#039;&amp;#039;&amp;#039;main thread&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* JavaScript has also been built around an &amp;#039;&amp;#039;&amp;#039;asynchronous&amp;#039;&amp;#039;&amp;#039; approach&lt;br /&gt;
** main thread will &amp;#039;&amp;#039;&amp;#039;not pause&amp;#039;&amp;#039;&amp;#039; when requested to load a resource of some sort&lt;br /&gt;
** will place request onto an &amp;#039;&amp;#039;&amp;#039;internal queue&amp;#039;&amp;#039;&amp;#039;, eventually be processed at a later point in time&lt;br /&gt;
** it does &amp;#039;&amp;#039;&amp;#039;take away&amp;#039;&amp;#039;&amp;#039; the need for in-memory locking mechanisms (other languages)&lt;br /&gt;
&lt;br /&gt;
=== Callbacks, promises, and async/await con&amp;#039;t ⌘===&lt;br /&gt;
* The &amp;#039;&amp;#039;&amp;#039;callback&amp;#039;&amp;#039;&amp;#039; mechanism - we provide a callback function to an asynchronous request&lt;br /&gt;
** it will be executed once the asynchronous request has been processed&lt;br /&gt;
* The &amp;#039;&amp;#039;&amp;#039;Promise&amp;#039;&amp;#039;&amp;#039; mechanism - provides a simplified syntax for writing asynchronous code&lt;br /&gt;
** allows to &amp;#039;&amp;#039;&amp;#039;chain&amp;#039;&amp;#039;&amp;#039; multiple asynchronous calls one after another (&amp;#039;&amp;#039;fluent syntax&amp;#039;&amp;#039;)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Async and await&amp;#039;&amp;#039;&amp;#039; technique - we mark certain functions as asynchronous&lt;br /&gt;
** use the &amp;#039;&amp;#039;&amp;#039;await&amp;#039;&amp;#039;&amp;#039; keyword to pause the execution flow &amp;#039;&amp;#039;until&amp;#039;&amp;#039; the asynchronous function returns&lt;br /&gt;
&lt;br /&gt;
=== Callbacks, promises, and async/await examples ⌘===&lt;br /&gt;
* Callbacks&lt;br /&gt;
** &amp;#039;&amp;#039;async_/examp_/callbacks&amp;#039;&amp;#039;&lt;br /&gt;
* Promises&lt;br /&gt;
** &amp;#039;&amp;#039;async_/examp_/promises&amp;#039;&amp;#039;&lt;br /&gt;
* Async/await&lt;br /&gt;
** &amp;#039;&amp;#039;async_/examp_/async_and_await&amp;#039;&amp;#039;&lt;br /&gt;
* Comparison of all approaches&lt;br /&gt;
** &amp;#039;&amp;#039;async_/examp_/callback_vs_..&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=== Callbacks, promises, and async/await exercises ⌘===&lt;br /&gt;
* Callbacks - &amp;#039;&amp;#039;async_/exerc_/ex1&amp;#039;&amp;#039;&lt;br /&gt;
* Promises - &amp;#039;&amp;#039;async_/exerc_/ex2&amp;#039;&amp;#039;&lt;br /&gt;
** Optional - &amp;#039;&amp;#039;async_/exerc_/a2&amp;#039;&amp;#039;&lt;br /&gt;
* Ex3 - async/await&lt;br /&gt;
** Optional - &amp;#039;&amp;#039;async_/exerc_/a3&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=== Writing a REST API with Node.js and TypeScript ⌘===&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;REST&amp;#039;&amp;#039;&amp;#039; is a very common standard for web traffic&lt;br /&gt;
** Most websites and web APIs operate using REST&lt;br /&gt;
* &amp;#039;&amp;#039;Representational State Transfer&amp;#039;&amp;#039;&lt;br /&gt;
* Defines concepts&lt;br /&gt;
** &amp;#039;&amp;#039;&amp;#039;operations&amp;#039;&amp;#039;&amp;#039; (&amp;quot;methods&amp;quot; or &amp;quot;verbs&amp;quot;) - GET, DELETE, POST, PUT, and PATCH&lt;br /&gt;
** &amp;#039;&amp;#039;&amp;#039;resources&amp;#039;&amp;#039;&amp;#039; (&amp;quot;path&amp;quot; or &amp;quot;noun&amp;quot;)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Example&amp;#039;&amp;#039;&amp;#039; - server - &amp;#039;&amp;#039;rest_/e1&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Exercises&amp;#039;&amp;#039;&amp;#039; - client - &amp;#039;&amp;#039;rest_/ex1&amp;#039;&amp;#039;&lt;br /&gt;
** Add missing functionalities &lt;br /&gt;
*** &amp;#039;&amp;#039;&amp;#039;Reactjs&amp;#039;&amp;#039;&amp;#039; - deleteOne, searchBy - &amp;#039;&amp;#039;other_/fe_/react-api-call-ts&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
*** &amp;#039;&amp;#039;&amp;#039;Angular&amp;#039;&amp;#039;&amp;#039; - ? - &amp;#039;&amp;#039;other_/fe_/angular-login-jwt&amp;#039;&amp;#039;&lt;br /&gt;
*** &amp;#039;&amp;#039;&amp;#039;Reactjs&amp;#039;&amp;#039;&amp;#039; - ? (async/await) - &amp;#039;&amp;#039;other_/fe_/react-query-ts&amp;#039;&amp;#039;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
** Discussion/homework - &amp;#039;&amp;#039;&amp;#039;migrate&amp;#039;&amp;#039;&amp;#039; from JS to TS - &amp;#039;&amp;#039;other_/be_&amp;#039;&amp;#039;&lt;/div&gt;</summary>
		<author><name>Lsokolowski</name></author>
	</entry>
</feed>