<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2452629445557820138</id><updated>2026-04-07T04:46:18.444+05:30</updated><category term="News"/><category term="Windows"/><category term="Tech News"/><category term="Windows 10"/><category term="Tips"/><category term="Microsoft Windows 11"/><category term="Silverlight"/><category term="Editorial"/><category term="Windows Insiders"/><category term="VisualStudio"/><category term="Windows10"/><category term="Microsoft Edge"/><category term="WP7"/><category term="Sponsored"/><category term=".Net"/><category term="Windows 10 Tips and Tricks"/><category term="Internet Browser"/><category term="WP7DEV"/><category term="Android"/><category term="Office"/><category term="CodeProject"/><category term="Web"/><category term="Office 365"/><category term="Windows 11 Dev Channel Build"/><category term="Microsoft 365"/><category term="Microsoft Edge Insiders"/><category term="WPDev"/><category term="Win10Tips"/><category term="DZone"/><category term="Office Insider"/><category term="WinDev"/><category term="Tutorial"/><category term="Latest Microsoft Office Insiders Preview Build"/><category term="SilverlightZone"/><category term="XAML"/><category term="WP8Dev"/><category term="Browser"/><category term="Visual Studio 2015"/><category term="Windows Phone"/><category term="Visual Studio 2017"/><category term="CSharp"/><category term="WP7Tips"/><category term="Win8"/><category term="WP8"/><category term="Windows8"/><category term="Mango"/><category term="Security"/><category term="Telerik"/><category term="Smartphone"/><category term="SilverlightTips"/><category term="Microsoft PowerToys"/><category term="Mobile"/><category term="WPF"/><category term="Azure"/><category term="Events"/><category term="WinRT"/><category term="Windows Patch Tuesday Update"/><category term="Artificial Intelligence"/><category term="Career"/><category term="Download latest version of Microsoft Edge (Chromium)"/><category term="Linux"/><category term="Microsoft Visual Studio 2022"/><category term="Git"/><category term="LightSwitch"/><category term="Microsoft Teams"/><category term="Silverlight5"/><category term="Visual Studio 2019"/><category term="Outlook"/><category term="Product Review"/><category term="Tech Launch"/><category term="Achievements"/><category term="Visual Studio 2015 Tips &amp; Tricks"/><category term="Windows 10 Creators Update"/><category term="C#"/><category term="Windows 10 Redstone 2"/><category term="Windows 10 Version 21H1"/><category term="ExpressionBlend"/><category term="Tools"/><category term="Google"/><category term="WP8Tips"/><category term="JavaScript"/><category term="SilverlightTutorial"/><category term="Windows 10 Fall Creators Update"/><category term="Windows 10 Version 20H2"/><category term="GitHub"/><category term="VisualStudio11"/><category term="Windows 10 April 2018 Update"/><category term="Windows 11 Canary Channel Build"/><category term="Google Chrome"/><category term="Visual Studio 2017 Tips &amp; Tricks"/><category term="Windows 10 Redstone 3"/><category term="Windows 10 Redstone 4"/><category term="Awards"/><category term="VisualStudio2012"/><category term="Windows 10 20H1 Build"/><category term="Windows 10 Dev Channel Build"/><category term="Windows 11 Beta Channel Build"/><category term="Windows 11 Patch Tuesday Update"/><category term="iOS"/><category term="Gadgets"/><category term="Git Basics"/><category term="Git Tutorial"/><category term="Windows 10 May 2020 Update"/><category term="Windows 10 Mobile"/><category term="Windows 10 Redstone 5"/><category term="Chrome"/><category term="SDK"/><category term="Visual Studio 2013"/><category term="Game"/><category term="Crypto Currency"/><category term="OneDrive"/><category term="UWPDev"/><category term="Windows 10 Version 21H2"/><category term="Windows Store"/><category term="macOS"/><category term="HTML"/><category term="Windows 10 19H1 Build"/><category term="Windows Phone 8.1"/><category term="MVP"/><category term="Windows 10 20H2 Build"/><category term="Windows 10 Patch Tuesday Update"/><category term="Windows Subsystem for Android (WSA)"/><category term="Book"/><category term="Git Cheatsheet"/><category term="SL5Tutorial"/><category term="Windows 11 Release Preview Channel Build"/><category term="Windows Phone Apps"/><category term="C# 4.0"/><category term="How to do in Windows 11"/><category term="WP7.8"/><category term="Solution"/><category term="UWP"/><category term="WPAppReview"/><category term="Win8Dev Tutorial"/><category term="Office 2016"/><category term="Outlook 2016"/><category term="TypeScript"/><category term="Windows7"/><category term="Excel"/><category term="GuestPost"/><category term="HTML5"/><category term="MVVM"/><category term="Manika-Chowdhury"/><category term="Metro"/><category term="WhatsApp"/><category term="Windows 10 October 2020 Update"/><category term="Windows 8.1"/><category term="Bitcoin"/><category term="GiveawayContest"/><category term="Lumia"/><category term="Microsoft Tuesday"/><category term="Node.js"/><category term="Skype"/><category term="Software Development and Project Management"/><category term="Visual Studio Code"/><category term="Visual Studio Productivity Tips"/><category term="Windows 10 Anniversary Update"/><category term="Windows Subsystem for Linux (WSL)"/><category term="Nokia"/><category term="Surface"/><category term="Windows 10 October 2018 Update"/><category term=".NET Core"/><category term="Archives"/><category term="Azure DevOps"/><category term="Azure Portal"/><category term="Azure Tutorial"/><category term="C# 6.0"/><category term="Generative AI"/><category term="LightSwitchTutorial"/><category term="Office 2013"/><category term="Office Insiders for Android"/><category term="ProductivityPowerTools"/><category term="Video"/><category term="Visual Studio 2019 Tips &amp; Tricks"/><category term="Windows 8 Tips"/><category term="XAMLTips"/><category term="eBook"/><category term="xiaomi"/><category term="5G Smartphones"/><category term="Android 13"/><category term="Build Conference"/><category term="Cloud"/><category term="Cloud Computing"/><category term="Gen AI"/><category term="KolkataGeeks"/><category term="Learn Angular from scratch"/><category term="Microsoft Copilot"/><category term="Microsoft PowerShell"/><category term="NokiaBlog"/><category term="SQL"/><category term="TeamPulse"/><category term="TypeScript Tutorial"/><category term="TypeScript Tutorial for beginners"/><category term="Win8Dev"/><category term="Windows 10 May 2019 Update"/><category term="Windows 10 May 2021 Update"/><category term="Windows 11 Tips and Tricks"/><category term="Android 11"/><category term="Android 12"/><category term="Android 14"/><category term="Azure Tips and Tricks"/><category term="Blockchain Technology"/><category term="GitHub Copilot"/><category term="Greetings"/><category term="Samsung"/><category term="Turbo360"/><category term="VPN"/><category term="VideoTutorial"/><category term="VisualStudio15"/><category term="Windows Copilot"/><category term="YouTube"/><category term="iPhone"/><category term="Cybersecurity"/><category term="Data Recovery"/><category term="DevCon"/><category term="Microsoft Windows 11 Troubleshooting Guide"/><category term="Microsoft Word"/><category term="Oppo"/><category term="Samsung Galaxy Smartphone"/><category term="Video Editing Software"/><category term="Virtual Reality"/><category term="Windows Defender"/><category term="Xiaomi Smartphones"/><category term="jQuery"/><category term="BUILD Conference 2023"/><category term="C# 5.0"/><category term="Digital Security"/><category term="Essay Writing Services"/><category term="HTML5 Tips"/><category term="Interoperability"/><category term="Interview Questions"/><category term="Office 2019"/><category term="Outlook 2013"/><category term="PUG"/><category term="Python"/><category term="SQLServer"/><category term="Stress Management"/><category term="TeamPulseTutorial"/><category term="Webcast"/><category term="Windows 10 November 2021 Update"/><category term="Windows 10 Version 22H2"/><category term="ASP.NET Core"/><category term="Agentic AI"/><category term="Android Weekly Digest"/><category term="Antivirus"/><category term="Auto Clicker for Windows"/><category term="CSS"/><category term="Certification"/><category term="CloudDocs in Serverless360"/><category term="Crypto Wallets"/><category term="DataGrid"/><category term="DevComponent"/><category term="Digital Marketing"/><category term="Exam"/><category term="InternetExplorer"/><category term="Java"/><category term="JetBrains"/><category term="Machine Learning"/><category term="Microsoft Edge 117"/><category term="Microsoft Office 2021"/><category term="NPOI Libraries"/><category term="Privacy"/><category term="RadRichTextBox"/><category term="Ransomware"/><category term="ReSharper"/><category term="Realme Phones"/><category term="Skype 8"/><category term="Stellar"/><category term="TFS"/><category term="Visual Studio 2015 Update 3 Patch"/><category term="Vivo"/><category term="Windows 11 Insider Preview Build 23493"/><category term="Windows 11 Insider Preview Build 25324"/><category term="Windows Feature Experience Pack"/><category term="Windows Terminal"/><category term="Animation"/><category term="Augmented Reality"/><category term="Automation"/><category term="Express VPN"/><category term="Facebook"/><category term="Firefox"/><category term="Honor 5 Series"/><category term="IE"/><category term="Ignite 2022 Conference"/><category term="Internet Technology"/><category term="Kinect"/><category term="Lumia800"/><category term="MEF"/><category term="MIX11"/><category term="MVB"/><category term="Microsoft Band"/><category term="Microsoft Defender"/><category term="Microsoft Dev Home"/><category term="Microsoft Edge 115"/><category term="Microsoft Edge 120"/><category term="Microsoft Editor"/><category term="Office 365 Migration Tool"/><category term="OpenDayIn"/><category term="PDF"/><category term="Python Tutorial"/><category term="Roblox Exploits and Script Executors"/><category term="Samsung Galaxy S24 Series"/><category term="Serverless360"/><category term="Smartphones under 20K"/><category term="SurveySparrow"/><category term="Swifdoo PDF"/><category term="Syncfusion"/><category term="WannaCry"/><category term="Windows 10 November 2019 Update"/><category term="Windows 11 Version 22H2"/><category term="iQOO"/><category term="uCertify"/><category term=".NET Standard"/><category term="AI"/><category term="AI-Driven Testing"/><category term="Ad Mediator"/><category term="Agile"/><category term="Async"/><category term="Azure Documenter in Serverless360"/><category term="BigData"/><category term="Bing"/><category term="C# Corner"/><category term="CSS3"/><category term="ChatGPT"/><category term="Cloud PC"/><category term="Command Prompt"/><category term="Digital Signature"/><category term="Entity Framework Core"/><category term="Form Builders"/><category term="HoloLens"/><category term="Honor Smartphones"/><category term="Hyper-V Manager"/><category term="Infragistics"/><category term="Instagram"/><category term="Intel"/><category term="IoT"/><category term="Joydeep-Das"/><category term="Known Folder Move"/><category term="LinkedIn"/><category term="MVC"/><category term="Malware"/><category term="Mastering Visual Studio 2017"/><category term="Microsoft Dev Drive"/><category term="Microsoft Edge 121"/><category term="Microsoft Edge 122"/><category term="Microsoft Exchange Server"/><category term="Microsoft HoloLens"/><category term="Microsoft PowerPoint"/><category term="Microsoft Visual Studio 2022 version 17.7"/><category term="Mixed Reality"/><category term="NFTs"/><category term="O365 Migration"/><category term="OP Auto Clicker"/><category term="OnePlus"/><category term="Oppo Reno Series"/><category term="Oppo Smartphones"/><category term="Outlook PST Repair Tool"/><category term="PDC2010"/><category term="PathListBox"/><category term="Pluralsight"/><category term="Publication"/><category term="RIA Service"/><category term="Remote Team Building and Cooperation Strategies"/><category term="SOAP Web Service"/><category term="SSL"/><category term="Serialization"/><category term="SkyDrive"/><category term="Surfshark VPN"/><category term="Survey Tool"/><category term="Tablet"/><category term="Tenorshare 4DDiG"/><category term="Top 5 Android News of the day"/><category term="Twitter"/><category term="Uno Platform"/><category term="VLC Media Player"/><category term="WCF"/><category term="WSDL"/><category term="Web Hosting Provider"/><category term="Web Service"/><category term="WinUI"/><category term="Windows 10 19H2 Build"/><category term="Windows 10 Weekly Digest"/><category term="Windows 11 Insider Preview Build 25217"/><category term="Windows 11 Insider Preview Build 25247"/><category term="Windows 365"/><category term="Windows 365 Cloud PC"/><category term="Windows Command Prompt"/><category term="Windows Template Studio"/><category term="Windows UI Library"/><category term="WonderFox DVD Ripper"/><category term="XML"/><category term="Xiaomi 12 Series Smartphones"/><category term=".NET 8"/><category term="10.or E"/><category term="10or"/><category term="2026 Trends"/><category term="3D SketchUp"/><category term="AI Agents"/><category term="ASUS"/><category term="ASUS Smartphone"/><category term="Adobe Acrobat Pro"/><category term="Agile Scrum"/><category term="Angular"/><category term="Apple"/><category term="Apple Siri"/><category term="Architecture"/><category term="Atlassian"/><category term="AutoMapper"/><category term="Azure Data Factory"/><category term="Azure documentation generator"/><category term="BUILD Conference 2022"/><category term="Batch File"/><category term="BenQ ZOWIE"/><category term="Best Practices"/><category term="Bing Rewards"/><category term="Bitbucket"/><category term="Brand Loyalty"/><category term="Build Conference 2016"/><category term="Build Conference 2020"/><category term="Business Growth"/><category term="C# 11"/><category term="C# 7.1"/><category term="C# 9.0"/><category term="CI/CD Pipelines"/><category term="CRM"/><category term="Candy Crush"/><category term="Cloud Migration Challenges"/><category term="Cloud Migration Strategy"/><category term="Cloud Storage Platforms"/><category term="Code Refactoring"/><category term="Code Review"/><category term="Connectify"/><category term="Console"/><category term="Coolmuster Android Assistant"/><category term="Crypto Obfuscator"/><category term="Customer Experience"/><category term="CyberGhost VPN"/><category term="Database"/><category term="Deep Learning"/><category term="DevOps"/><category term="Download Music for Free on Android"/><category term="Drone Technology"/><category term="Dynamics 365 CRM"/><category term="E-commerce Optimization"/><category term="EMUI 9.0"/><category term="EaseUS Data Recovery Wizard"/><category term="Employee Wellbeing"/><category term="Esports"/><category term="Etcher"/><category term="ExpressionStudio"/><category term="F#"/><category term="FBVideoDown Video Downloader"/><category term="FlexClip"/><category term="FreeCharge"/><category term="Frontend"/><category term="Frugal-Dad"/><category term="Gaming Monitors"/><category term="Gemini"/><category term="GitHub Actions"/><category term="GitLab"/><category term="Google AdWords"/><category term="Google Docs"/><category term="Google Gemini"/><category term="Google Maps"/><category term="Google Photos"/><category term="Google+"/><category term="GooglePlus"/><category term="Graphics Optimization"/><category term="Guerilla Malware"/><category term="HP Laptops"/><category term="HTML Cheat Sheet"/><category term="Hardware Guide"/><category term="Harikrishna Kundariya"/><category term="Healthcare"/><category term="HideME VPN"/><category term="Honeygain"/><category term="Honor 8 Pro"/><category term="Honor 80"/><category term="Honor 80 Pro"/><category term="Honor 80 Series Smartphones"/><category term="Honor 90"/><category term="Honor Magic 7 Pro"/><category term="Honor MagicOS 8"/><category term="Honor MagicOS 9"/><category term="Humix Videos"/><category term="HyperOS"/><category term="IE10"/><category term="IE9"/><category term="IIS"/><category term="INETA"/><category term="Ignite 2019 Conference"/><category term="ImagineCup"/><category term="InVideo Video Editing Software"/><category term="Indian SME"/><category term="Infinix"/><category term="Infinix Note"/><category term="Infinix Note 30"/><category term="Infinix Note 30 VIP Racing Edition"/><category term="Input Lag"/><category term="Instagram Stories"/><category term="Instagram Video Downloader"/><category term="Internet of Things"/><category term="Interview"/><category term="Inventory Management"/><category term="JIRA"/><category term="JSON"/><category term="Jenkins"/><category term="JustDecompile"/><category term="Kelly-Marsh"/><category term="Kids"/><category term="LastPass"/><category term="LogicNP Software"/><category term="M365 tenant move"/><category term="MDR"/><category term="MSDN"/><category term="Made by Google Event"/><category term="Marketing Tips"/><category term="Maven"/><category term="Mental Health"/><category term="Microsoft 365 Migration"/><category term="Microsoft 365 Transition"/><category term="Microsoft Edge 116"/><category term="Microsoft Edge 119"/><category term="Microsoft Edge 124"/><category term="Microsoft Edge 125"/><category term="Microsoft Edge 127"/><category term="Microsoft Lens"/><category term="Microsoft Office 2024"/><category term="Microsoft Visual Studio 2022 version 17.8"/><category term="Microsoft Visual Studio 2022 version 17.9"/><category term="MicrosoftMonday"/><category term="MiniTool Movie Maker Tool"/><category term="MobiKin Doctor"/><category term="MongoDB"/><category term="Monitor Reviews"/><category term="Mozilla"/><category term="MySQL Database"/><category term="NDepend"/><category term="Neha-Choudhary"/><category term="Node.js Video Tutorial Series"/><category term="Nord VPN"/><category term="Notepad++"/><category term="Nova Launcher"/><category term="NuGet"/><category term="O365 Data Backup"/><category term="OPPO F23 5G Smartphone"/><category term="Obfuscator"/><category term="Office 2010"/><category term="OneNote"/><category term="OnePlus 11"/><category term="OnePlus 11 Smartphone Specs and Price"/><category term="OnePlus Smartphones"/><category term="Oppo A11S Smartphones"/><category term="Oppo A36 Smartphone"/><category term="Oppo A59 5G Smartphone"/><category term="Outlook RT"/><category term="PC Gaming"/><category term="PHP"/><category term="Packt"/><category term="Passive Income"/><category term="Performance"/><category term="Petya"/><category term="Phishing"/><category term="PhysicsLibrary"/><category term="Picasa"/><category term="Planet VPN"/><category term="Play Station"/><category term="Poco"/><category term="Poco X3"/><category term="Poco X3 Smartphone"/><category term="Powe BI"/><category term="Predator Spyware"/><category term="Prisma"/><category term="Programming Language"/><category term="Project Reunion"/><category term="Quantum Computing"/><category term="RSC"/><category term="RSS"/><category term="React"/><category term="Realme 11 Series"/><category term="Realme Narzo 20 Series Smartphones"/><category term="Realme Narzo Smartphones"/><category term="Redmi 9 Prime Smartphone"/><category term="Redmi Note 11 Series Smartphones"/><category term="Redmi Note 12 Series Smartphones"/><category term="Refresh Rate"/><category term="Remote Work and Collaboration"/><category term="Resume"/><category term="Retail Business Growth"/><category term="Retail Fundamentals"/><category term="Retail POS Systems"/><category term="Retail Technology"/><category term="SSD"/><category term="SSSGram Video Downloader"/><category term="Salesforce Experience Cloud"/><category term="Samsung Galaxy M51"/><category term="Samsung Galaxy S21"/><category term="Samsung Galaxy S22 Series"/><category term="Scanning Tools"/><category term="Sejda PDF"/><category term="Shivprasad Koirala"/><category term="Siri"/><category term="Siri 2.0"/><category term="Small Business"/><category term="Smartwatches"/><category term="Snaptube Music Downloader"/><category term="Snoopza - Android Phone Tracker"/><category term="Snyk"/><category term="Solid State Drives"/><category term="Sonarqube"/><category term="Stellar Migrator Review"/><category term="Stellar Migrator for Exchange"/><category term="Store Location Strategy"/><category term="Surface Pro"/><category term="Surface Pro 8"/><category term="SysTools"/><category term="SysTools Hard Drive Data Recovery"/><category term="TLS 1.3"/><category term="Tech In India"/><category term="Techno Pova 5G Smartphone"/><category term="Telerik Developer Expert"/><category term="Tenant to Tenant Migration Software"/><category term="Tenant-to-Tenant Migration"/><category term="Testing"/><category term="TickTick"/><category term="TradePub"/><category term="Truecaller"/><category term="Urban VPN"/><category term="Valorant"/><category term="VeePN VPN"/><category term="Veracode"/><category term="Virtual Employees"/><category term="Vivo T1 5G Smartphone"/><category term="Vivo X100 Series 5G Smartphones"/><category term="Vivo Y21T"/><category term="Vivo Y78 5G Smartphone"/><category term="VoIP"/><category term="Web Development"/><category term="Wi-Fi Extenders"/><category term="Windows 10 Release Preview Channel Build"/><category term="Windows 11 Insider Preview Build 23419"/><category term="Windows 11 Insider Preview Build 23424"/><category term="Windows 11 Insider Preview Build 25281"/><category term="Windows 11 Insider Preview Build 26063"/><category term="Windows 11 September 2023 Update"/><category term="Windows 11 Version 21H2"/><category term="Windows 11 Version 23H2"/><category term="Windows 11 Version 24H2"/><category term="Windows 9"/><category term="Windows Community Toolkit"/><category term="Windows Presentation Foundation Development Cookbook"/><category term="Wondershare"/><category term="Wondershare Virbo Synthesia"/><category term="Work Life Balance"/><category term="Xamarin"/><category term="Xiaomi 14 Series Smartphones"/><category term="Yammer"/><category term="Zoom"/><category term="boAt Smartwatches"/><category term="dotPeek"/><category term="eSIM"/><category term="iPad"/><category term="iPhone 11"/><category term="iQOO 12 Android Smartphone"/><category term="iQOO Neo 6 Smartphones"/><category term="iQOO Neo 7 Pro"/><category term="iTextSharp"/><title type='text'>Latest Tech News, Product Reviews, articles and more - Kunal-Chowdhury.com</title><subtitle type='html'>Discover the latest technical news and trends in the industry. Explore our comprehensive coverage of cutting-edge technologies and innovations.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://www.kunal-chowdhury.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/2452629445557820138/posts/default/-/CodeProject?max-results=10'/><link rel='alternate' type='text/html' href='https://www.kunal-chowdhury.com/search/label/CodeProject'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='https://www.blogger.com/feeds/2452629445557820138/posts/default/-/CodeProject/-/CodeProject?start-index=11&amp;max-results=10'/><author><name>Kunal Chowdhury</name><uri>http://www.blogger.com/profile/12654622239949849381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>126</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>10</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2452629445557820138.post-2065649780610586152</id><published>2018-06-19T21:18:00.000+05:30</published><updated>2018-06-21T22:16:22.494+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="CodeProject"/><category scheme="http://www.blogger.com/atom/ns#" term="DZone"/><category scheme="http://www.blogger.com/atom/ns#" term="News"/><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio 2017"/><category scheme="http://www.blogger.com/atom/ns#" term="VisualStudio"/><title type='text'>Visual Studio 2017 version 15.7 Update 4 (15.7.4) is now available</title><content type='html'>&lt;p&gt;Microsoft Visual Studio 2017 version 15.7.4 (latest version: 15.7 Update 4) is a new servicing update for &lt;a href=&quot;//www.kunal-chowdhury.com/2018/05/download-visual-studio-2017-v15.7.html&quot; target=&quot;_blank&quot; alt=&quot;Visual Studio 2017 version 15.7&quot; title=&quot;Visual Studio 2017 version 15.7&quot;&gt;Visual Studio 2017 installation&lt;/a&gt;. If you are running Visual Studio 2017, update to the latest version 15.7.4 to resolve a bunch of issues that has been fixed by Microsoft.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;To get the updates, either check for update notification within the IDE or launch the Visual Studio Installer. Check out this blog post to know what has been fixed in this update build.&lt;/p&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7yv19E4FGlxp5E56Q_LO1mcfLAm0oi5jVbJpgrsW0-jMcyXaGIsel_ePBqolh2cNB31OGMuZpVnAbMExdiXM7HYW0Qpe-OiP9OEcwaYZNHnhfSpO_5ONXkJOyrrTpdiLZvy73hyphenhyphenQR3XU/s1600/visual-studio-2017-15.7-update-4.jpg&quot; class=&quot;postImage&quot; alt=&quot;Download Visual Studio 2017 version 15.7 Update 4 (15.7.4)&quot; title=&quot;Download Visual Studio 2017 version 15.7 Update 4 (15.7.4)&quot;/&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;Download latest version of Visual Studio 2017&lt;/h2&gt;
&lt;p&gt;Visual Studio 2017 is the latest version of Visual Studio IDE, and comes in three different editions. The different editions of Visual Studio 2017 are: Visual Studio Community 2017, Visual Studio Professional 2017 and Visual Studio Enterprise 2017.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;If you are indie developer and/or building open-source projects, you can download Microsoft Visual Studio Community 2017 for free. It gives you total power of the Professional Edition.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 👉 &amp;#160;&amp;#160; &lt;a href=&quot;//www.kunal-chowdhury.com/p/download-visual-studio-2017.html&quot; target=&quot;_blank&quot; alt=&quot;Download latest version of Microsoft Visual Studio 2017 for free&quot; title=&quot;Download latest version of Microsoft Visual Studio 2017 for free&quot;&gt;&lt;strong&gt;Click here to download latest version of Visual Studio 2017&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;hr/&gt;
&lt;p&gt;&lt;font size=&quot;+1&quot; color=&quot;red&quot;&gt;&lt;b&gt;&lt;u&gt;You may like to read:&lt;/u&gt;&lt;/b&gt;&lt;/font&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;//www.kunal-chowdhury.com/2018/06/visual-studio-2019.html&quot; alt=&quot;Visual Studio 2019 has been announced by Microsoft&quot; title=&quot;Visual Studio 2019 has been announced by Microsoft&quot; target=&quot;_blank&quot;&gt;Visual Studio 2019 has been announced by Microsoft&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;//www.kunal-chowdhury.com/2018/06/download-windows-template-studio-2.2.html&quot; alt=&quot;Windows Template Studio 2.2 released with 3D Launcher feature, Wizard enhancements and more&quot; title=&quot;Windows Template Studio 2.2 released with 3D Launcher feature, Wizard enhancements and more&quot; target=&quot;_blank&quot;&gt;Windows Template Studio 2.2 released with 3D Launcher feature, Wizard enhancements and more&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;//www.kunal-chowdhury.com/p/download-dotnet-framework-48.html&quot; alt=&quot;Download latest version of .NET Framework 4.8&quot; title=&quot;Download latest version of .NET Framework 4.8&quot;&gt;Download latest version of .NET Framework 4.8&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;
&lt;hr/&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;Top issues fixed in Visual Studio 2017 v15.7.4&lt;/h2&gt;
&lt;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://developercommunity.visualstudio.com/content/problem/248016/green-squiggles-and-light-bulb-with-macro-in-skipp.html&quot; rel=&quot;noindex nofollow&quot; target=&quot;_blank&quot; link-type=&quot;external&quot;&gt;Green squiggles and light bulb with &quot;Macro in skipped region&quot; message&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developercommunity.visualstudio.com/content/problem/247269/f7-does-not-switch-to-code.html&quot; rel=&quot;noindex nofollow&quot; target=&quot;_blank&quot; link-type=&quot;external&quot; class=&quot;x-hidden-focus&quot;&gt;F7 does not switch to code&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developercommunity.visualstudio.com/content/problem/247977/f7-does-not-build-anymore.html&quot; rel=&quot;noindex nofollow&quot; target=&quot;_blank&quot; link-type=&quot;external&quot;&gt;F7 does not build anymore&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developercommunity.visualstudio.com/content/problem/249912/f7-build-does-not-work.html&quot; rel=&quot;noindex nofollow&quot; target=&quot;_blank&quot; link-type=&quot;external&quot;&gt;F7 build does not work&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developercommunity.visualstudio.com/content/problem/242854/link-error-telemetry-event-upload-failed-failed-to.html&quot; rel=&quot;noindex nofollow&quot; target=&quot;_blank&quot; link-type=&quot;external&quot;&gt;LINK : error : Telemetry event upload failed: &#39;Failed to open connection to VCTIP&#39;&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developercommunity.visualstudio.com/content/problem/266846/axml-file-doesnt-open.html&quot; rel=&quot;noindex nofollow&quot; target=&quot;_blank&quot; link-type=&quot;external&quot;&gt;AXML file doesn&#39;t open after update&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developercommunity.visualstudio.com/content/problem/248625/f7-no-longer-toggles-between-the-designer-and-the.html&quot; rel=&quot;noindex nofollow&quot; target=&quot;_blank&quot; link-type=&quot;external&quot;&gt;F7 no longer toggles between the designer and the code&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developercommunity.visualstudio.com/content/problem/265926/xaml-editor-error-window-is-not-supported-in-wpf-p.html&quot; rel=&quot;noindex nofollow&quot; target=&quot;_blank&quot; link-type=&quot;external&quot;&gt;XAML Editor Error: Window is not supported in WPF project&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developercommunity.visualstudio.com/content/problem/256541/winforms-viewtoggledesigner-does-not-work-as-it-us.html&quot; rel=&quot;noindex nofollow&quot; target=&quot;_blank&quot; link-type=&quot;external&quot;&gt;WinForms View.ToggleDesigner does not work as it used to&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developercommunity.visualstudio.com/content/problem/247756/toggle-designer-key-binding-lost.html&quot; rel=&quot;noindex nofollow&quot; target=&quot;_blank&quot; link-type=&quot;external&quot;&gt;Toggle designer key binding lost&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developercommunity.visualstudio.com/content/problem/247813/f7-starts-no-new-build.html&quot; rel=&quot;noindex nofollow&quot; target=&quot;_blank&quot; link-type=&quot;external&quot;&gt;F7 does not start a new build&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developercommunity.visualstudio.com/content/problem/262261/switching-between-designer-and-code-views.html&quot; rel=&quot;noindex nofollow&quot; target=&quot;_blank&quot; link-type=&quot;external&quot;&gt;F7 no longer toggles between Designer and Code views&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developercommunity.visualstudio.com/content/problem/268007/c语言中结构体定义的问题.html&quot; rel=&quot;noindex nofollow&quot; target=&quot;_blank&quot; link-type=&quot;external&quot;&gt;There is a problem with structure definition in C language&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developercommunity.visualstudio.com/content/problem/274778/provisioning-a-new-sql-server-and-new-sql-db-in-a.html&quot; rel=&quot;noindex nofollow&quot; target=&quot;_blank&quot; link-type=&quot;external&quot;&gt;Provisioning a new SQL Server and new SQL DB in a different region than the App Service plan fails&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Source:&lt;/b&gt; &lt;a href=&quot;https://docs.microsoft.com/en-us/visualstudio/releasenotes/vs2017-relnotes&quot; target=&quot;_blank&quot; link-type=&quot;external&quot;&gt;Visual Studio 2017 Release Notes&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;

</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/2452629445557820138/posts/default/2065649780610586152'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/2452629445557820138/posts/default/2065649780610586152'/><link rel='alternate' type='text/html' href='https://www.kunal-chowdhury.com/2018/06/download-visual-studio-2017-v15.7.4.html' title='Visual Studio 2017 version 15.7 Update 4 (15.7.4) is now available'/><author><name>Kunal Chowdhury</name><uri>http://www.blogger.com/profile/12654622239949849381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7yv19E4FGlxp5E56Q_LO1mcfLAm0oi5jVbJpgrsW0-jMcyXaGIsel_ePBqolh2cNB31OGMuZpVnAbMExdiXM7HYW0Qpe-OiP9OEcwaYZNHnhfSpO_5ONXkJOyrrTpdiLZvy73hyphenhyphenQR3XU/s72-c/visual-studio-2017-15.7-update-4.jpg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-2452629445557820138.post-5196407910376350591</id><published>2018-06-15T20:44:00.000+05:30</published><updated>2018-06-21T22:16:22.560+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><category scheme="http://www.blogger.com/atom/ns#" term="CodeProject"/><category scheme="http://www.blogger.com/atom/ns#" term="DZone"/><category scheme="http://www.blogger.com/atom/ns#" term="News"/><category scheme="http://www.blogger.com/atom/ns#" term="UWP"/><category scheme="http://www.blogger.com/atom/ns#" term="UWPDev"/><category scheme="http://www.blogger.com/atom/ns#" term="WinDev"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows Template Studio"/><category scheme="http://www.blogger.com/atom/ns#" term="WPDev"/><title type='text'>Windows Template Studio 2.2 released with 3D Launcher feature, Wizard enhancements and more</title><content type='html'>&lt;p&gt;Microsoft has released a new update to Windows Template Studio. The latest version of &lt;keywords&gt;Windows Template Studio 2.2&lt;/keywords&gt; includes 3D Launcher feature, Wizard enhancements, improved documentations and many bug fixes.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;To know more about the new changes and improvements part of this release, and to learn how to install this update, continue reading the post.&lt;/p&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmE9NVSUUl1mPJfQT58oCc__2mMvizJD5smD7KSroxgqDS-tgH4OEoaL9Wd26Q4cEsnZGK9gqj2WW3nk3S5m-9qoktad8uUVP4U_n27ScKBjGNzXR9F2n9ehnf93MFPAGF7FybG2a7ffk/s1600/download-windows-template-studio-2.2.jpg&quot; class=&quot;postImage&quot; alt=&quot;Download Windows Template Studio 2.2 for developers&quot; title=&quot;Download Windows Template Studio 2.2 for developers&quot;/&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;How to download/update Windows Template Studio 2.2?&lt;/h2&gt;
&lt;p&gt;If you are installing Windows Template Studio for the first time, navigate to &lt;a href=&quot;https://aka.ms/wtsinstall&quot; target=&quot;_blank&quot; alt=&quot;Download latest version of Windows Template Studio&quot; title=&quot;Download latest version of Windows Template Studio&quot;&gt;https://aka.ms/wtsinstall&lt;/a&gt;, click the &lt;screen&gt;Download&lt;/screen&gt; button. Once downloaded, double click the VSIX installer to start the installation process.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;In case you have an older version of Windows Template Studio already installed on your development environment, Visual Studio will auto update the extension. To force the update process, go to &lt;screen&gt;Tools&lt;/screen&gt; | &lt;screen&gt;Extensions and Updates&lt;/screen&gt; | &lt;screen&gt;Update&lt;/screen&gt; | &lt;screen&gt;Windows Template Studio&lt;/screen&gt;. Then click the &lt;screen&gt;Update&lt;/screen&gt; button to continue.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;What&#39;s new and improved in Template Studio 2.2?&lt;/h2&gt;
&lt;p&gt;The latest version of Windows Template Studio 2.2 includes 3D Launcher feature, Wizard enhancements, improved documentations and improved testing support. Apart from that, the latest build also includes the following changes and fixes:&lt;/p&gt;

&lt;p&gt;
&lt;ul&gt;
&lt;li&gt;Update Nuget Reference: &lt;code&gt;Microsoft.NETCore.UniversalWindowsPlatform&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Update Nuget Reference: &lt;code&gt;Telerik.UI.for.UniversalWindowsPlatform&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Update Nuget Reference: &lt;code&gt;Microsoft.Toolkit.Uwp.UI.Controls&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Update Nuget Reference: &lt;code&gt;Microsoft.Toolkit.Uwp.Notifications&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Update Nuget Reference: &lt;code&gt;Microsoft.Toolkit.Uwp&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Update Nuget Reference: &lt;code&gt;Newtonsoft.Json&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Link Moved&lt;/li&gt;
&lt;li&gt;Help/About details are incorrect&lt;/li&gt;
&lt;li&gt;Dependency template do not receive projectname as parameter&lt;/li&gt;
&lt;li&gt;Created project is always rebuild in Visual Studio, making testing slow&lt;/li&gt;
&lt;li&gt;Add background load flag to &lt;code&gt;RelayCommand&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Update App Center feature to include latest SDK version and crash reporting support&lt;/li&gt;
&lt;li&gt;WTS is extracting templates after VS Update&lt;/li&gt;
&lt;li&gt;App crash on Prism Framework&lt;/li&gt;
&lt;li&gt;UWP Unit Tests are not discoverable using MVVM Light&lt;/li&gt;
&lt;li&gt;New project from wizard &lt;code&gt;v2.1.18124.1&lt;/code&gt; omits several folders/items from project&lt;/li&gt;
&lt;li&gt;When trying to delete and item that is a dependency, tell all dependant items&lt;/li&gt;
&lt;li&gt;Suspend/resume with Caliburn Micro: resume handler not invoked&lt;/li&gt;
&lt;li&gt;Image gallery and left/right arrows and esc key&lt;/li&gt;
&lt;li&gt;Scroll on touch devices not working on pages and features section&lt;/li&gt;
&lt;li&gt;Add checks for links in docs and comments that are out of date&lt;/li&gt;
&lt;li&gt;Update references to &#39;UWP Community Toolkit&#39;&lt;/li&gt;
&lt;li&gt;Bug: fails to install with &quot;do not have supported versions&quot;&lt;/li&gt;
&lt;li&gt;Review extraction of files to localize&lt;/li&gt;
&lt;li&gt;First default mainpage (in wizard) is not removable&lt;/li&gt;
&lt;li&gt;Support adding a 3D app launcher for when the app is used in MR&lt;/li&gt;
&lt;li&gt;Deleting code in MergePostactions deletes all occurrences of code&lt;/li&gt;
&lt;li&gt;Remove unnecessary calls to `await Task.CompletedTask;`&lt;/li&gt;
&lt;li&gt;Undo &quot;ignore obsolete warnings&quot; on stylecop and sonarlint tests when NavigationView is in place&lt;/li&gt;
&lt;li&gt;Add documentation with platform specific recommendations&lt;/li&gt;
&lt;li&gt;Docs: Activation for nav pane and directly going to a page&lt;/li&gt;
&lt;li&gt;Overview tab does not open automatically on project creation&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Apart from these, Microsoft also hinted that, they are working on new features that they are going to include in future builds. These includes Menubar navigation pattern template, WinUI Library nuget package integration, Continued refinement with Fluent Design in the templates, Work for supporting multiple projects in a single solution, Ink templates, User Activity APIs for Timeline support and Improved Right-click -&gt; add support for existing projects.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;

</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/2452629445557820138/posts/default/5196407910376350591'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/2452629445557820138/posts/default/5196407910376350591'/><link rel='alternate' type='text/html' href='https://www.kunal-chowdhury.com/2018/06/download-windows-template-studio-2.2.html' title='Windows Template Studio 2.2 released with 3D Launcher feature, Wizard enhancements and more'/><author><name>Kunal Chowdhury</name><uri>http://www.blogger.com/profile/12654622239949849381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmE9NVSUUl1mPJfQT58oCc__2mMvizJD5smD7KSroxgqDS-tgH4OEoaL9Wd26Q4cEsnZGK9gqj2WW3nk3S5m-9qoktad8uUVP4U_n27ScKBjGNzXR9F2n9ehnf93MFPAGF7FybG2a7ffk/s72-c/download-windows-template-studio-2.2.jpg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-2452629445557820138.post-7392630338222971013</id><published>2018-06-07T00:21:00.000+05:30</published><updated>2018-06-21T22:16:22.627+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="CodeProject"/><category scheme="http://www.blogger.com/atom/ns#" term="DZone"/><category scheme="http://www.blogger.com/atom/ns#" term="News"/><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio 2019"/><category scheme="http://www.blogger.com/atom/ns#" term="VisualStudio"/><title type='text'>Visual Studio 2019 has been announced by Microsoft</title><content type='html'>&lt;p&gt;Microsoft today announced that the &lt;b&gt;next version of Visual Studio will be named as &lt;keywords&gt;Visual Studio 2019&lt;/keywords&gt;&lt;/b&gt; and the preview version of Visual Studio 2019 can be installed side-by-side with Visual Studio 2017. Though the release dates of Visual Studio 2019 is not yet announced, but the preview version of the IDE can be expected in the coming months.&lt;/p&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNQ1lb4e-PcbY0xn6V2OTORWxt59oxclmj4x1CPKoL6s66wa7QQur0lfoyQib_N2zbf9Qt9tREC_2IK-iWUZqvX6yYew11EsJnR5Q1a73-oBJBllj-pIPCfk00_7xunBeWnoAgdpRKoFE/s1600/visual-studio-2019.jpg&quot; class=&quot;postImage&quot; alt=&quot;Visual Studio 2019 has been announced by Microsoft&quot; title=&quot;Visual Studio 2019 has been announced by Microsoft&quot;/&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;The next version of Visual Studio, i.e. Visual Studio 2019 will be committed towards faster execution, more productive for developers to perform their tasks; be it be refactorings, debugings and/or faster build process. It will also give more focus on real time collaborations between team members using the capabilities like &lt;a href=&quot;//www.kunal-chowdhury.com/2018/05/visual-studio-live-share.html&quot; target=&quot;_blank&quot; alt=&quot;Visual Studio Live Share - An extension to collaboratively work in real time&quot; title=&quot;Visual Studio Live Share - An extension to collaboratively work in real time&quot;&gt;&lt;strong&gt;Live Share&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Best part is that the &lt;keywords&gt;Visual Studio 2019 Preview can be installed side-by-side with Visual Studio 2017&lt;/keywords&gt; and will not require any major upgrade of the Operating System. You can &lt;a href=&quot;//www.kunal-chowdhury.com/p/download-visual-studio-2017.html&quot; target=&quot;_blank&quot; alt=&quot;Download the latest version of Visual Studio 2017&quot; title=&quot;Download the latest version of Visual Studio 2017&quot;&gt;&lt;strong&gt;download the latest version of Visual Studio 2017&lt;/strong&gt;&lt;/a&gt;, if you haven&#39;t done already.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Original announcement published by John Montgomery, Director of Program Management for Visual Studio, can be found &lt;a href=&quot;https://blogs.msdn.microsoft.com/visualstudio/2018/06/06/whats-next-for-visual-studio/&quot; target=&quot;_blank&quot; alt=&quot;What’s Next for Visual Studio&quot; title=&quot;What’s Next for Visual Studio&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;

</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/2452629445557820138/posts/default/7392630338222971013'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/2452629445557820138/posts/default/7392630338222971013'/><link rel='alternate' type='text/html' href='https://www.kunal-chowdhury.com/2018/06/visual-studio-2019.html' title='Visual Studio 2019 has been announced by Microsoft'/><author><name>Kunal Chowdhury</name><uri>http://www.blogger.com/profile/12654622239949849381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNQ1lb4e-PcbY0xn6V2OTORWxt59oxclmj4x1CPKoL6s66wa7QQur0lfoyQib_N2zbf9Qt9tREC_2IK-iWUZqvX6yYew11EsJnR5Q1a73-oBJBllj-pIPCfk00_7xunBeWnoAgdpRKoFE/s72-c/visual-studio-2019.jpg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-2452629445557820138.post-1777695247240992722</id><published>2018-06-05T01:00:00.000+05:30</published><updated>2018-06-21T22:15:52.127+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="CodeProject"/><category scheme="http://www.blogger.com/atom/ns#" term="DZone"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="Learn Angular from scratch"/><category scheme="http://www.blogger.com/atom/ns#" term="Node.js"/><category scheme="http://www.blogger.com/atom/ns#" term="Tutorial"/><category scheme="http://www.blogger.com/atom/ns#" term="TypeScript"/><category scheme="http://www.blogger.com/atom/ns#" term="TypeScript Tutorial"/><category scheme="http://www.blogger.com/atom/ns#" term="TypeScript Tutorial for beginners"/><title type='text'>How to define an Interface in TypeScript? -- TypeScript Tutorial for beginners</title><content type='html'>&lt;p&gt;An interface in TypeScript contains only the declaration of the methods and properties, but not the implementation. It is the responsibility of the class that implements the interface by providing implementation for all the members of the interface.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Today, in this TypeScript Tutorial, we will learn how to work with Interfaces in TypeScript. Continue reading to learn more.&lt;/p&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6jmBsZQhR2Yrs6ut_HhvBqhkomf-ARNAy57aEjGu4pG4w8rDxAnKygrNb2PZ_SMLO4zO_LM7OQIIdJjsybhZRHOae3pTaEWQFuRhkgSDVRvQ41JGQDc-AzCBRNnGB6KSuh6nYdViD0Hw/s1600/typescript-tutorial-interface.jpg&quot; class=&quot;postImage&quot; alt=&quot;How to define an Interface in TypeScript? -- TypeScript Tutorial for beginners&quot; title=&quot;How to define an Interface in TypeScript? -- TypeScript Tutorial for beginners&quot;/&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p class=&quot;infoGreen&quot;&gt;&lt;a href=&quot;//www.kunal-chowdhury.com/p/typescript-tutorial.html?utm_source=typescript&amp;utm_medium=referral&quot; target=&quot;_blank&quot; alt=&quot;Click here to read TypeScript Tutorial - Getting started with TypeScript&quot; title=&quot;Click here to read TypeScript Tutorial - Getting started with TypeScript&quot;&gt;&lt;font size=&quot;+2&quot;&gt;&lt;strong&gt;👉 TypeScript Tutorial - Getting started with TypeScript&lt;/strong&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;Class implementing interfaces&lt;/h2&gt;
&lt;p&gt;Just like C# and Java, you can create contract for classes by implementing Interface. Interface defines public properties and methods of a class. It does not have any private members and must not have any implementations of its members.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;In TypeScript, you can define an interface by using the keyword &lt;code&gt;interface&lt;/code&gt; as below. By default, all the members in an interface are public.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;div style=&quot;background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .1em;padding:.2em .6em;&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;interface&lt;/span&gt; Person {
 fullName: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;;
 
 toString();
}
&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Once the interface is defined, you can implement it in a class by following this convention: &lt;code&gt;class [ClassName] implements [InterfaceName]&lt;/code&gt;. Let&#39;s create two classes named &lt;code&gt;Employee&lt;/code&gt; and &lt;code&gt;Customer&lt;/code&gt; implementing the &lt;code&gt;Person&lt;/code&gt; interface:&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;div style=&quot;background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .1em;padding:.2em .6em;&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; Employee &lt;span style=&quot;color: #0000ff&quot;&gt;implements&lt;/span&gt; Person {
 empID: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;;
 fullName: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;;
 
 &lt;span style=&quot;color: #0000ff&quot;&gt;constructor&lt;/span&gt; (eID: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;, name: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;) {
  &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.empID = eID;
  &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.fullName = name;
 }
 
 toString() {
  console.log(&lt;span style=&quot;border: 1px solid #FF0000&quot;&gt;`&lt;/span&gt;EMP ID of ${fullName}: ${empID}&lt;span style=&quot;border: 1px solid #FF0000&quot;&gt;`&lt;/span&gt;);
 }
}

&lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; Customer &lt;span style=&quot;color: #0000ff&quot;&gt;implements&lt;/span&gt; Person {
 custID: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;;
 fullName: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;;
 
 &lt;span style=&quot;color: #0000ff&quot;&gt;constructor&lt;/span&gt; (cID: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;, name: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;) {
  &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.custID = cID;
  &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.fullName = name;
 }
 
 toString() {
  console.log(&lt;span style=&quot;border: 1px solid #FF0000&quot;&gt;`&lt;/span&gt;Customer ID of ${fullName}: ${custID}&lt;span style=&quot;border: 1px solid #FF0000&quot;&gt;`&lt;/span&gt;);
 }
}
&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Let&#39;s create the instance of the classes. As both the &lt;code&gt;Employee&lt;/code&gt; and the &lt;code&gt;Customer&lt;/code&gt; object is of type &lt;code&gt;Person&lt;/code&gt;, let us create it this way:&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;div style=&quot;background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .1em;padding:.2em .6em;&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;let&lt;/span&gt; employee: &lt;span style=&quot;color: #2b91af&quot;&gt;Person&lt;/span&gt; = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; Employee(&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;E001&amp;quot;&lt;/span&gt;, &lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Kunal&amp;quot;&lt;/span&gt;);
&lt;span style=&quot;color: #0000ff&quot;&gt;let&lt;/span&gt; customer: &lt;span style=&quot;color: #2b91af&quot;&gt;Person&lt;/span&gt; = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; Customer(&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;C001&amp;quot;&lt;/span&gt;, &lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;);
&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Let&#39;s call the &lt;code&gt;toString()&lt;/code&gt; method of both the instances and observe how it prints the person detail in the screen:&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;div style=&quot;background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .1em;padding:.2em .6em;&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;employee.toString(); &lt;span style=&quot;color: #008000&quot;&gt;// prints employee details&lt;/span&gt;
customer.toString(); &lt;span style=&quot;color: #008000&quot;&gt;// prints customer details&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;Interface extending another interfaces&lt;/h2&gt;
&lt;p&gt;In TypeScript, you can also extend an interface from another interface. This allows you to copy the members of one interface into another. So, more flexibility can be possible by separating your interfaces into reusable components. For example, the &lt;code&gt;TwoWheeler&lt;/code&gt; interface extends &lt;code&gt;Vehicle&lt;/code&gt; interface as below:&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;div style=&quot;background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .1em;padding:.2em .6em;&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;interface&lt;/span&gt; Vehicle {
}

&lt;span style=&quot;color: #0000ff&quot;&gt;interface&lt;/span&gt; TwoWheeler &lt;span style=&quot;color: #0000ff&quot;&gt;implements&lt;/span&gt; Vehicle {
}
&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;In TypeScript, an interface can also extend multiple interfaces. For example, let&#39;s see the following code where &lt;code&gt;TwoWheeler&lt;/code&gt; interface extends &lt;code&gt;Vehicle&lt;/code&gt; and &lt;code&gt;Engine&lt;/code&gt; interfaces:&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;div style=&quot;background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .1em;padding:.2em .6em;&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;interface&lt;/span&gt; Vehicle {
}

&lt;span style=&quot;color: #0000ff&quot;&gt;interface&lt;/span&gt; Engine {
}

&lt;span style=&quot;color: #0000ff&quot;&gt;interface&lt;/span&gt; TwoWheeler &lt;span style=&quot;color: #0000ff&quot;&gt;extends&lt;/span&gt; Vehicle, Engine {
}
&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;Interface extending classes&lt;/h2&gt;
&lt;p&gt;TypeScript allows you to extend an interface from a class type. In this case, the declaration of the members of the class gets inherited to the interface but not their implementations. This is as good as a class inheriting from an interface.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;div style=&quot;background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .1em;padding:.2em .6em;&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; Vehicle {
    &lt;span style=&quot;color: #0000ff&quot;&gt;constructor&lt;/span&gt; (&lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; brand: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;) { }
 
    getBrandName() {
        &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; brand;
    }
}

&lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; Engine {
    &lt;span style=&quot;color: #0000ff&quot;&gt;constructor&lt;/span&gt; (&lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; manufacturer: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;) { }
 
    getManufacturerName() {
        &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; manufacturer;
    }
}

&lt;span style=&quot;color: #0000ff&quot;&gt;interface&lt;/span&gt; TwoWheeler &lt;span style=&quot;color: #0000ff&quot;&gt;extends&lt;/span&gt; Vehicle, Engine {
    getBrandName();
    getManufacturerName()
}
&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;In simple words, you can create an interface that extends a class and then can be implemented in another class or interface.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;Summary&lt;/h2&gt;
&lt;p&gt;So, today we have learned how to define an interface using the keyword interface, how to implement an interface in a class, how to extend and interface from another interface and how to extend a class in an interface.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;If you are from C# or Java background, interface extending a class will be new to you in TypeScript. Hope you liked the tutorial. Don&#39;t forget to checkout my other posts from the TypeScript Tutorial series. You can find the link below.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p class=&quot;infoGreen&quot;&gt;&lt;a href=&quot;//www.kunal-chowdhury.com/p/typescript-tutorial.html?utm_source=typescript&amp;utm_medium=referral&quot; target=&quot;_blank&quot; alt=&quot;Click here to read TypeScript Tutorial - Getting started with TypeScript&quot; title=&quot;Click here to read TypeScript Tutorial - Getting started with TypeScript&quot;&gt;&lt;font size=&quot;+2&quot;&gt;&lt;strong&gt;👉 TypeScript Tutorial - Getting started with TypeScript&lt;/strong&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;a href=&quot;https://www.kunal-chowdhury.com&quot; rel=&quot;tag&quot; style=&quot;display:none&quot;&gt;CodeProject&lt;/a&gt;
</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/2452629445557820138/posts/default/1777695247240992722'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/2452629445557820138/posts/default/1777695247240992722'/><link rel='alternate' type='text/html' href='https://www.kunal-chowdhury.com/2018/06/typescript-tutorial-interface.html' title='How to define an Interface in TypeScript? -- TypeScript Tutorial for beginners'/><author><name>Kunal Chowdhury</name><uri>http://www.blogger.com/profile/12654622239949849381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6jmBsZQhR2Yrs6ut_HhvBqhkomf-ARNAy57aEjGu4pG4w8rDxAnKygrNb2PZ_SMLO4zO_LM7OQIIdJjsybhZRHOae3pTaEWQFuRhkgSDVRvQ41JGQDc-AzCBRNnGB6KSuh6nYdViD0Hw/s72-c/typescript-tutorial-interface.jpg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-2452629445557820138.post-5300811953385117193</id><published>2018-05-25T01:00:00.000+05:30</published><updated>2018-06-21T22:15:52.398+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="CodeProject"/><category scheme="http://www.blogger.com/atom/ns#" term="DZone"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="Learn Angular from scratch"/><category scheme="http://www.blogger.com/atom/ns#" term="Node.js"/><category scheme="http://www.blogger.com/atom/ns#" term="Tutorial"/><category scheme="http://www.blogger.com/atom/ns#" term="TypeScript"/><category scheme="http://www.blogger.com/atom/ns#" term="TypeScript Tutorial"/><category scheme="http://www.blogger.com/atom/ns#" term="TypeScript Tutorial for beginners"/><title type='text'>How to inherit a class in TypeScript? -- TypeScript Tutorial for beginners</title><content type='html'>&lt;p&gt;Just like any other OOPs supported languages, TypeScript also allows you to inherit a base class. In the last article, we learned &lt;a href=&quot;//www.kunal-chowdhury.com/2018/05/typescript-tutorial-class-definition.html&quot; target=&quot;_blank&quot; alt=&quot;TypeScript Tutorial for absolute beginners -- Getting started with TypeScript -- How to define a class in TypeScript?&quot; title=&quot;TypeScript Tutorial for absolute beginners -- Getting started with TypeScript -- How to define a class in TypeScript?&quot;&gt;&lt;b&gt;how to create class in TypeScript&lt;/b&gt;&lt;/a&gt;. We have also learned how to create a constructor and how to instantiate a class object.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;In this article of the &lt;a href=&quot;//www.kunal-chowdhury.com/p/typescript-tutorial.html&quot; target=&quot;_blank&quot; alt=&quot;TypeScript Tutorial for absolute beginners -- Getting started with TypeScript&quot; title=&quot;TypeScript Tutorial for absolute beginners -- Getting started with TypeScript&quot;&gt;&lt;b&gt;TypeScript Tutorial for beginners series&lt;/b&gt;&lt;/a&gt;, we will learn how to inherit a TypeScript class. Continue reading to learn it today.&lt;/p&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZdXMdWUKtL3yaiFrJvJJamlMs9QtwyjXBU40Xpfrxzrty_jogBkl8rzJqes5ih7aHDh9IWc1am1WKMYlBPT0IxFCbiX86QkalAcgfoMuyLDd1DAH4ltijN6kKecRxZY-GZ7kGqmbpBBE/s1600/typescript-tutorial-class-inheritance-thumbnail.jpg&quot; style=&quot;display:none;&quot;/&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIFYhhmXFmoyLmmLTrz6xOHrctLI90YZPlTcrMTFMYxRlbhwyFgP-q8GXz2s5XgPhh9KcwzPqGH4RtPFOWjUNatIyX-GetsDr9xDUE3nDNATx8mf3YGvR9xqbtnXspXL_s4-JxJe2mk0c/s1600/typescript-tutorial-class-inheritance.jpg&quot; class=&quot;postImage&quot; alt=&quot;TypeScript Tutorial for beginners -- Getting started with TypeScript -- How to inherit a class in TypeScript?&quot; title=&quot;TypeScript Tutorial for beginners -- Getting started with TypeScript -- How to inherit a class in TypeScript?&quot;/&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p class=&quot;infoGreen&quot;&gt;&lt;a href=&quot;//www.kunal-chowdhury.com/p/typescript-tutorial.html?utm_source=typescript&amp;utm_medium=referral&quot; target=&quot;_blank&quot; alt=&quot;Click here to read TypeScript Tutorial - Getting started with TypeScript&quot; title=&quot;Click here to read TypeScript Tutorial - Getting started with TypeScript&quot;&gt;&lt;font size=&quot;+2&quot;&gt;&lt;strong&gt;👉 TypeScript Tutorial - Getting started with TypeScript&lt;/strong&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;Inheritance in TypeScript&lt;/h2&gt;
In TypeScript, you can inherit a class from another class. Just use the &lt;code&gt;extends&lt;/code&gt; keyword to perform inheritance. Consider the following example to understand it better:&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;
&lt;div style=&quot;background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; Person {
 &lt;span style=&quot;color: #008000&quot;&gt;// properties&lt;/span&gt;
 firstName: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;;
 lastName: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;;
 
 &lt;span style=&quot;color: #008000&quot;&gt;// construtor&lt;/span&gt;
 &lt;span style=&quot;color: #0000ff&quot;&gt;constructor&lt;/span&gt; (fName: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;, lName: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;) {
  &lt;span style=&quot;color: #008000&quot;&gt;// fill the properties&lt;/span&gt;
  &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.firstName = fName;
  &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.lastName = lName;
 }
 
 &lt;span style=&quot;color: #008000&quot;&gt;// method&lt;/span&gt;
 getFullName() {
  &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;border: 1px solid #FF0000&quot;&gt;`&lt;/span&gt;${firstName} ${lastName}&lt;span style=&quot;border: 1px solid #FF0000&quot;&gt;`&lt;/span&gt;;
 }
}

&lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; Employee &lt;span style=&quot;color: #0000ff&quot;&gt;extends&lt;/span&gt; Person {
 &lt;span style=&quot;color: #008000&quot;&gt;// properties&lt;/span&gt;
 empID: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;;
 designation: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;;
 
 &lt;span style=&quot;color: #008000&quot;&gt;// construtor&lt;/span&gt;
 &lt;span style=&quot;color: #0000ff&quot;&gt;constructor&lt;/span&gt; (fName: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;, lName: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;,
     eID: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;, desig: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;) {
  &lt;span style=&quot;color: #008000&quot;&gt;// call the base class constructor&lt;/span&gt;
  &lt;span style=&quot;color: #0000ff&quot;&gt;super&lt;/span&gt;(fName, lName);
  
  &lt;span style=&quot;color: #008000&quot;&gt;// fill the other properties&lt;/span&gt;
  &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.empID = eID;
  &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.designation = desig;
 }
 
 &lt;span style=&quot;color: #008000&quot;&gt;// method&lt;/span&gt;
 toString() {
  &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;border: 1px solid #FF0000&quot;&gt;`&lt;/span&gt;${empID} - ${firstName} ${lastName}
    =&amp;gt; ${designation}&lt;span style=&quot;border: 1px solid #FF0000&quot;&gt;`&lt;/span&gt;;
 }
}
&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Here the &lt;code&gt;Employee&lt;/code&gt; class inherits its base &lt;code&gt;Person&lt;/code&gt; by writing &lt;code&gt;class Employee extends Person&lt;/code&gt;. In the derived class &lt;code&gt;super(...)&lt;/code&gt; can be used to call the constructor of the base class. For example, &lt;code&gt;super(fName, lName)&lt;/code&gt; in &lt;code&gt;Employee&lt;/code&gt; class constructor calls the base class constructor by passing the parameter values &lt;code&gt;fName&lt;/code&gt; and &lt;code&gt;lName&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Now, in the following code snippet, we created the instance of the &lt;code&gt;Employee&lt;/code&gt; class and passed four parameters to its constructor. In the implementation of the &lt;code&gt;Employee&lt;/code&gt; class constructor, we called the base class constructor to pass the first name and last name of the employee. So, when you call the &lt;code&gt;toString()&lt;/code&gt; method of the derived class, it will print out both the properties.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;
&lt;div style=&quot;background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;let&lt;/span&gt; employee: &lt;span style=&quot;color: #2b91af&quot;&gt;Employee&lt;/span&gt; = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; Employee(&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Kunal&amp;quot;&lt;/span&gt;,
                                      &lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Chowdhury&amp;quot;&lt;/span&gt;,
                                      &lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;EMP001022&amp;quot;&lt;/span&gt;,
                                      &lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Software Engineer&amp;quot;&lt;/span&gt;
                                     );
console.log(employee.toString());
&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;Summary&lt;/h2&gt;
&lt;p&gt;Let&#39;s summarize what we learned today. We learned how to inherit a class from a base class in TypeScript using the &lt;code&gt;extends&lt;/code&gt; keyword. Then we discussed how to call a base class constructor by passing the respective values to it. In the next article of &lt;a href=&quot;//www.kunal-chowdhury.com/p/typescript-tutorial.html&quot; target=&quot;_blank&quot; alt=&quot;TypeScript Tutorial for absolute beginners -- Getting started with TypeScript&quot; title=&quot;TypeScript Tutorial for absolute beginners -- Getting started with TypeScript&quot;&gt;this tutorial series&lt;/a&gt;, we will discuss about interface. Till then, happy learning!&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p class=&quot;infoGreen&quot;&gt;&lt;a href=&quot;//www.kunal-chowdhury.com/p/typescript-tutorial.html?utm_source=typescript&amp;utm_medium=referral&quot; target=&quot;_blank&quot; alt=&quot;Click here to read TypeScript Tutorial - Getting started with TypeScript&quot; title=&quot;Click here to read TypeScript Tutorial - Getting started with TypeScript&quot;&gt;&lt;font size=&quot;+2&quot;&gt;&lt;strong&gt;👉 TypeScript Tutorial - Getting started with TypeScript&lt;/strong&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;a href=&quot;https://www.kunal-chowdhury.com&quot; rel=&quot;tag&quot; style=&quot;display:none&quot;&gt;CodeProject&lt;/a&gt;
</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/2452629445557820138/posts/default/5300811953385117193'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/2452629445557820138/posts/default/5300811953385117193'/><link rel='alternate' type='text/html' href='https://www.kunal-chowdhury.com/2018/05/typescript-tutorial-inheritance.html' title='How to inherit a class in TypeScript? -- TypeScript Tutorial for beginners'/><author><name>Kunal Chowdhury</name><uri>http://www.blogger.com/profile/12654622239949849381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZdXMdWUKtL3yaiFrJvJJamlMs9QtwyjXBU40Xpfrxzrty_jogBkl8rzJqes5ih7aHDh9IWc1am1WKMYlBPT0IxFCbiX86QkalAcgfoMuyLDd1DAH4ltijN6kKecRxZY-GZ7kGqmbpBBE/s72-c/typescript-tutorial-class-inheritance-thumbnail.jpg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-2452629445557820138.post-548917983627020350</id><published>2018-05-22T01:00:00.000+05:30</published><updated>2018-06-21T22:15:52.467+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="CodeProject"/><category scheme="http://www.blogger.com/atom/ns#" term="DZone"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="Learn Angular from scratch"/><category scheme="http://www.blogger.com/atom/ns#" term="Node.js"/><category scheme="http://www.blogger.com/atom/ns#" term="Tutorial"/><category scheme="http://www.blogger.com/atom/ns#" term="TypeScript"/><category scheme="http://www.blogger.com/atom/ns#" term="TypeScript Tutorial"/><category scheme="http://www.blogger.com/atom/ns#" term="TypeScript Tutorial for beginners"/><title type='text'>How to define a class in TypeScript? -- TypeScript Tutorial for beginners</title><content type='html'>&lt;p&gt;Earlier in the TypeScript Tutorial series (Getting started with TypeScript) we learnt about the &lt;a href=&quot;//www.kunal-chowdhury.com/2018/05/typescript-tutorial-helloworld.html?utm_source=typescript&amp;amp;utm_medium=referral&quot; target=&quot;_blank&quot; alt=&quot;TypeScript Tutorial - Getting started with TypeScript -- What is tsconfig.json configuration file?&quot; title=&quot;TypeScript Tutorial - Getting started with TypeScript -- What is tsconfig.json configuration file?&quot;&gt;TypeScript configuration file&lt;/a&gt;, &lt;a href=&quot;//www.kunal-chowdhury.com/2018/05/typescript-tutorial-helloworld.html?utm_source=typescript&amp;amp;utm_medium=referral&quot; target=&quot;_blank&quot; alt=&quot;TypeScript Tutorial - Getting started with TypeScript -- How to declare variables in TypeScript?&quot; title=&quot;TypeScript Tutorial - Getting started with TypeScript -- How to declare variables in TypeScript?&quot;&gt;variable declaration&lt;/a&gt; and &lt;a href=&quot;//www.kunal-chowdhury.com/2018/05/typescript-tutorial-data-types.html?utm_source=typescript&amp;amp;utm_medium=referral&quot; target=&quot;_blank&quot; alt=&quot;TypeScript Tutorial - Getting started with TypeScript -- What are the basic data types in TypeScript?&quot; title=&quot;TypeScript Tutorial - Getting started with TypeScript -- What are the basic data types in TypeScript?&quot;&gt;basic data types&lt;/a&gt;. I hope that was neat and clear to understand the very basics of TypeScript.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Today in this article, we will learn how to define a class and instantiate class object. Continue reading to learn about it today.&lt;/p&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiezYxyyhGp_sW32eyeFhCmLF_vusSFTXgBciEqK8_4RgOgaX8A46Bze2X27-dLcqp9IJtPC7xV234xGk2MPxD_OsbAV74dkB-DRWo9CeQ4aots05fP42L0FmJVtndLX0jxR8CQwAhIIes/s1600/typescript-tutorial-class-definition-thumbnail.jpg&quot; style=&quot;display:none;&quot;/&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilvtkal8NPbX4CJWW5jSbAO7BqGY38ED8RwZiGgQgQADY1eFz-ld63RXzaYLkVQWS6Cp4kJt_LCUbUHhh1nMOMmG6BXTkJoPxwg6uqaccls84KSUSqds5wAsr9JBzjbRfuxzicQhP0CUA/s1600/typescript-tutorial-class-definition.jpg&quot; class=&quot;postImage&quot; alt=&quot;Getting started with TypeScript -- How to define a class in TypeScript?&quot; title=&quot;Getting started with TypeScript -- How to define a class in TypeScript?&quot;/&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p class=&quot;infoGreen&quot;&gt;&lt;a href=&quot;//www.kunal-chowdhury.com/p/typescript-tutorial.html?utm_source=typescript&amp;utm_medium=referral&quot; target=&quot;_blank&quot; alt=&quot;Click here to read TypeScript Tutorial - Getting started with TypeScript&quot; title=&quot;Click here to read TypeScript Tutorial - Getting started with TypeScript&quot;&gt;&lt;font size=&quot;+2&quot;&gt;&lt;strong&gt;👉 TypeScript Tutorial - Getting started with TypeScript&lt;/strong&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;Defining a class in TypeScript&lt;/h2&gt;
&lt;p&gt;In TypeScript, you can use OOPs concept and create classes. Just like C# and other OOPs oriented programming languages, you can define a class with the keyword &lt;code&gt;class&lt;/code&gt;. Let&#39;s take the following example into consideration:&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;
&lt;div style=&quot;background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; Person {
 &lt;span style=&quot;color: #008000&quot;&gt;// properties&lt;/span&gt;
 firstName: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;;
 lastName: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;;
 
 &lt;span style=&quot;color: #008000&quot;&gt;// default construtor&lt;/span&gt;
 &lt;span style=&quot;color: #0000ff&quot;&gt;constructor&lt;/span&gt; () {
 }

 &lt;span style=&quot;color: #008000&quot;&gt;// parameterized construtor&lt;/span&gt;
 &lt;span style=&quot;color: #0000ff&quot;&gt;constructor&lt;/span&gt; (fName: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;, lName: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;) {
  &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.firstName = fName;
  &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.lastName = lName;
 }
 
 &lt;span style=&quot;color: #008000&quot;&gt;// method&lt;/span&gt;
 getFullName() {
  &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;border: 1px solid #FF0000&quot;&gt;`&lt;/span&gt;${firstName} ${lastName}&lt;span style=&quot;border: 1px solid #FF0000&quot;&gt;`&lt;/span&gt;;
 }
}
&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;In the above example, the class &lt;code&gt;Person&lt;/code&gt; has four members: two properties (&lt;code&gt;firstName&lt;/code&gt;, &lt;code&gt;lastName&lt;/code&gt;), two class constructors (&lt;code&gt;constructor&lt;/code&gt;) and one method (&lt;code&gt;getFullName()&lt;/code&gt;). To access the members of the class, you can use &lt;code&gt;this&lt;/code&gt; operator. For example, &lt;code&gt;this.firstName&lt;/code&gt;, &lt;code&gt;this.getFullName()&lt;/code&gt; etc.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;By default all the members in a TypeScript class are public. This is as good as marking the members as public using the &lt;code&gt;public&lt;/code&gt; access modifier. The above class can be written as below, by explicitly marking the members as &lt;code&gt;public&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;
&lt;div style=&quot;background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; Person {
 &lt;span style=&quot;color: #008000&quot;&gt;// properties&lt;/span&gt;
 &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; firstName: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;;
 &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; lastName: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;;
 
 &lt;span style=&quot;color: #008000&quot;&gt;// default construtor&lt;/span&gt;
 &lt;span style=&quot;color: #0000ff&quot;&gt;constructor&lt;/span&gt; () {
 }
 
 &lt;span style=&quot;color: #008000&quot;&gt;// construtor&lt;/span&gt;
 &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;constructor&lt;/span&gt; (fName: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;, lName: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;) {
  &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.firstName = fName;
  &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.lastName = lName;
 }
 
 &lt;span style=&quot;color: #008000&quot;&gt;// method&lt;/span&gt;
 &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; getFullName() {
  &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;border: 1px solid #FF0000&quot;&gt;`&lt;/span&gt;${firstName} ${lastName}&lt;span style=&quot;border: 1px solid #FF0000&quot;&gt;`&lt;/span&gt;;
 }
}
&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;Defining constructors in a TypeScript class&lt;/h2&gt;
&lt;p&gt;A class can have two types of constructors: default constructor and parameterized constructor. In the above example, the first constructor is a default constructor, which takes no/zero parameters. The second one is a parameterized constructor, which takes one or more parameter values (in our case, it takes two inputs):&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;
&lt;div style=&quot;background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;
&lt;span style=&quot;color: #008000&quot;&gt;// default construtor&lt;/span&gt;
&lt;span style=&quot;color: #0000ff&quot;&gt;constructor&lt;/span&gt; () {
}
 
&lt;span style=&quot;color: #008000&quot;&gt;// construtor&lt;/span&gt;
&lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;constructor&lt;/span&gt; (fName: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;, lName: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;) {
 &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.firstName = fName;
 &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.lastName = lName;
}
&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;In the above example, we have first defined the properties, then passed the values using parameterized constructor and then filled those properties. TypeScript supports automatic property creation. Instead of following all these steps, if you define the constructor parameters as public, TypeScript will do rest of the job for you.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Consider the following example which shows how to define a property using parameterized constructor:&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;
&lt;!-- HTML generated using hilite.me --&gt;&lt;div style=&quot;background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; Person {
 &lt;span style=&quot;color: #008000&quot;&gt;// parameterized construtor&lt;/span&gt;
 &lt;span style=&quot;color: #0000ff&quot;&gt;constructor&lt;/span&gt; (&lt;span style=&quot;color: #0000ff&quot;&gt;&lt;b&gt;public&lt;/b&gt;&lt;/span&gt; fName: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;, &lt;span style=&quot;color: #0000ff&quot;&gt;&lt;b&gt;public&lt;/b&gt;&lt;/span&gt; lName: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;) {
 }
 
 &lt;span style=&quot;color: #008000&quot;&gt;// method&lt;/span&gt;
 getFullName() {
  &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;border: 1px solid #FF0000&quot;&gt;`&lt;/span&gt;${firstName} ${lastName}&lt;span style=&quot;border: 1px solid #FF0000&quot;&gt;`&lt;/span&gt;;
 }
}
&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;Instantiating an instance of a TypeScript class&lt;/h2&gt;
&lt;p&gt;To create the instance of the class and access it&#39;s members, you can use &lt;code&gt;new&lt;/code&gt; operator, the way you create a class instance in C# and/or Java. Here&#39;s two different approaches to create the class instance:&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;
&lt;div style=&quot;background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;let&lt;/span&gt; person: &lt;span style=&quot;color: #2b91af&quot;&gt;Person&lt;/span&gt; = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; Person(&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Kunal&amp;quot;&lt;/span&gt;, &lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Chowdhury&amp;quot;&lt;/span&gt;);
console.log(person.getFullName());

&lt;span style=&quot;color: #008000&quot;&gt;// alternative way&lt;/span&gt;
&lt;span style=&quot;color: #0000ff&quot;&gt;let&lt;/span&gt; person = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; Person(&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Kunal&amp;quot;&lt;/span&gt;, &lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Chowdhury&amp;quot;&lt;/span&gt;);
console.log(person.getFullName());
&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p class=&quot;infoGreen&quot;&gt;&lt;a href=&quot;//www.kunal-chowdhury.com/p/typescript-tutorial.html?utm_source=typescript&amp;utm_medium=referral&quot; target=&quot;_blank&quot; alt=&quot;Click here to read TypeScript Tutorial - Getting started with TypeScript&quot; title=&quot;Click here to read TypeScript Tutorial - Getting started with TypeScript&quot;&gt;&lt;font size=&quot;+2&quot;&gt;&lt;strong&gt;👉 TypeScript Tutorial - Getting started with TypeScript&lt;/strong&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;a href=&quot;https://www.kunal-chowdhury.com&quot; rel=&quot;tag&quot; style=&quot;display:none&quot;&gt;CodeProject&lt;/a&gt;
</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/2452629445557820138/posts/default/548917983627020350'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/2452629445557820138/posts/default/548917983627020350'/><link rel='alternate' type='text/html' href='https://www.kunal-chowdhury.com/2018/05/typescript-tutorial-class-definition.html' title='How to define a class in TypeScript? -- TypeScript Tutorial for beginners'/><author><name>Kunal Chowdhury</name><uri>http://www.blogger.com/profile/12654622239949849381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiezYxyyhGp_sW32eyeFhCmLF_vusSFTXgBciEqK8_4RgOgaX8A46Bze2X27-dLcqp9IJtPC7xV234xGk2MPxD_OsbAV74dkB-DRWo9CeQ4aots05fP42L0FmJVtndLX0jxR8CQwAhIIes/s72-c/typescript-tutorial-class-definition-thumbnail.jpg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-2452629445557820138.post-1892925338040975624</id><published>2018-05-17T06:00:00.000+05:30</published><updated>2018-06-21T22:15:52.195+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="CodeProject"/><category scheme="http://www.blogger.com/atom/ns#" term="DZone"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="Learn Angular from scratch"/><category scheme="http://www.blogger.com/atom/ns#" term="Node.js"/><category scheme="http://www.blogger.com/atom/ns#" term="Tutorial"/><category scheme="http://www.blogger.com/atom/ns#" term="TypeScript"/><category scheme="http://www.blogger.com/atom/ns#" term="TypeScript Tutorial"/><category scheme="http://www.blogger.com/atom/ns#" term="TypeScript Tutorial for beginners"/><title type='text'>What are the basic data types in TypeScript? -- TypeScript Tutorial for beginners</title><content type='html'>&lt;p&gt;Like JavaScript and any other languages, TypeScript also provides basic data types to handle numbers, strings etc. Some common data types in TypeScript are: &lt;code&gt;number&lt;/code&gt;, &lt;code&gt;string&lt;/code&gt;, &lt;code&gt;boolean&lt;/code&gt;, &lt;code&gt;enum&lt;/code&gt;, &lt;code&gt;void&lt;/code&gt;, &lt;code&gt;null&lt;/code&gt;, &lt;code&gt;undefined&lt;/code&gt;, &lt;code&gt;any&lt;/code&gt;, &lt;code&gt;never&lt;/code&gt;, &lt;code&gt;Array&lt;/code&gt; and &lt;code&gt;tuple&lt;/code&gt;.

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Let&#39;s learn more about these basic data types of TypeScript, which you will need to use always. Let&#39;s learn with suitable examples.&lt;/p&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOTnHIowcCkl4SlL03SZpGsI5syIogU76TpWaG0KRlJh8xKjfh9a9HWA-IDVNGfg6e2-VVrPqXC9QYilN0EhUA3nQ01eesGpjgSsCJVfnyz7-vi8wQXrQvqE-pnObd8uS7IwXyMdhY_yA/s1600/typescript-tutorial-data-types-thumbnail.jpg&quot; style=&quot;display:none;&quot;/&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieXtsSBlT81M2u6t003hMjTX1KyX7s7Q9ecgD93N44qNeJuMXWKnK1WlluQvzZWY9uPMZU740XUmvm1uwIj-B_LS9rqAIPn6dvF7DX6gNmddBrVp1huMEC7jKUiWcO0nWjAP2-OzapJg4/s1600/typescript-tutorial-data-types.jpg&quot; class=&quot;postImage&quot; alt=&quot;Getting started with TypeScript -- Let&#39;s learn about basic data types&quot; title=&quot;Getting started with TypeScript -- Let&#39;s learn about basic data types&quot;/&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p class=&quot;infoGreen&quot;&gt;&lt;a href=&quot;//www.kunal-chowdhury.com/p/typescript-tutorial.html?utm_source=typescript&amp;amp;utm_medium=referral&quot; target=&quot;_blank&quot; alt=&quot;Click here to read TypeScript Tutorial - Getting started with TypeScript&quot; title=&quot;Click here to read TypeScript Tutorial - Getting started with TypeScript&quot;&gt;&lt;font size=&quot;+2&quot;&gt;&lt;strong&gt;👉 TypeScript Tutorial - Getting started with TypeScript&lt;/strong&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;Number types&lt;/h2&gt;
&lt;p&gt;In TypeScript, numbers are floating point values having the type as &lt;code&gt;number&lt;/code&gt;. You can assign any numeric values including decimals, hexadecimals, binary and octal literals. But to use binary and octal literals, you must use a TypeScript version which follows &lt;keywords&gt;ECMAScript 2015&lt;/keywords&gt; or higher.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Here&#39;s some examples of declaring numeric values:&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;
&lt;div style=&quot;background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;let&lt;/span&gt; decimalValue: &lt;span style=&quot;color: #2b91af&quot;&gt;number&lt;/span&gt; = 10;
&lt;span style=&quot;color: #0000ff&quot;&gt;let&lt;/span&gt; hexaDecimalValue: &lt;span style=&quot;color: #2b91af&quot;&gt;number&lt;/span&gt; = 0xf10b;
&lt;span style=&quot;color: #0000ff&quot;&gt;let&lt;/span&gt; binaryValue: &lt;span style=&quot;color: #2b91af&quot;&gt;number&lt;/span&gt; = 0b110100;
&lt;span style=&quot;color: #0000ff&quot;&gt;let&lt;/span&gt; octalValue: &lt;span style=&quot;color: #2b91af&quot;&gt;number&lt;/span&gt; = 0o410;
&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;String types&lt;/h2&gt;
&lt;p&gt;When you want to use textual data, the string types are used and is denoted by the keyword &lt;code&gt;string&lt;/code&gt;. Like JavaScript, TypeScript also uses double quotes (&lt;code&gt;&quot;&lt;/code&gt;) and single quotes (&lt;code&gt;&#39;&lt;/code&gt;) to surround the string value.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;
&lt;div style=&quot;background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;let&lt;/span&gt; firstName: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt; = &lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Kunal&amp;quot;&lt;/span&gt;; &lt;span style=&quot;color: #008000&quot;&gt;// using double quotes&lt;/span&gt;
&lt;span style=&quot;color: #0000ff&quot;&gt;let&lt;/span&gt; lastName: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt; = &lt;span style=&quot;color: #a31515&quot;&gt;&amp;#39;Chowdhury&amp;#39;&lt;/span&gt;; &lt;span style=&quot;color: #008000&quot;&gt;// using single quotes&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;When you want to span a string to multiple lines and/or have to embedded expressions (&lt;code&gt;${expression}&lt;/code&gt;), you can use templated strings. The templated strings are surrounded by backquote/backtick (&lt;code&gt;`&lt;/code&gt;) as shown in the below code snippets:&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;
&lt;div style=&quot;background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;let&lt;/span&gt; firstName: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt; = &lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Kunal&amp;quot;&lt;/span&gt;;
&lt;span style=&quot;color: #0000ff&quot;&gt;let&lt;/span&gt; lastName: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt; = &lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Chowdhury&amp;quot;&lt;/span&gt;;

&lt;span style=&quot;color: #0000ff&quot;&gt;let&lt;/span&gt; message: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt; = &lt;span style=&quot;border: 1px solid #FF0000&quot;&gt;`&lt;/span&gt;Hi, my name is: &lt;span style=&quot;color: #2b91af&quot;&gt;$&lt;/span&gt;{firstName} ${lastName}&lt;span style=&quot;border: 1px solid #FF0000&quot;&gt;`&lt;/span&gt;;
&lt;span style=&quot;color: #0000ff&quot;&gt;let&lt;/span&gt; spannedMessage: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt; = &lt;span style=&quot;border: 1px solid #FF0000&quot;&gt;`&lt;/span&gt;Hi,
My name is: &lt;span style=&quot;color: #2b91af&quot;&gt;$&lt;/span&gt;{firstName} ${lastName}&lt;span style=&quot;border: 1px solid #FF0000&quot;&gt;`&lt;/span&gt;;
&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;Boolean types&lt;/h2&gt;
&lt;p&gt;To use boolean data types in TypeScript, for declaring variables, use the &lt;code&gt;boolean&lt;/code&gt; keyword. Here&#39;s a simple code to declare a boolean type variable:&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;
&lt;div style=&quot;background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;let&lt;/span&gt; isPrimaryAccount: &lt;span style=&quot;color: #2b91af&quot;&gt;boolean&lt;/span&gt; = &lt;span style=&quot;color: #0000ff&quot;&gt;true&lt;/span&gt;;
&lt;span style=&quot;color: #0000ff&quot;&gt;let&lt;/span&gt; hasCards: &lt;span style=&quot;color: #2b91af&quot;&gt;boolean&lt;/span&gt; = &lt;span style=&quot;color: #0000ff&quot;&gt;false&lt;/span&gt;;
&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;Enum types&lt;/h2&gt;
&lt;p&gt;Enumerated data types (enum) are a set of numeric values with a more friendly names. It&#39;s an addition on top of JavaScript that TypeScript offers. The variables of enumerated data types are declared with the keyword &lt;code&gt;enum&lt;/code&gt;. Here&#39;s how you can declare an enum variable and use it in TypeScript:&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;
&lt;div style=&quot;background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;enum&lt;/span&gt; CardTypes { Debit, Credit, Virtual }
&lt;span style=&quot;color: #0000ff&quot;&gt;let&lt;/span&gt; card: &lt;span style=&quot;color: #2b91af&quot;&gt;CardTypes&lt;/span&gt; = CardTypes.Debit;
&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;By default the enum values start from 0 (zero), but you can also set it by manually entering the value of its members. Consider the following two examples:&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;
&lt;div style=&quot;background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;enum&lt;/span&gt; CardTypes { Debit = 1, Credit, Virtual }
&lt;span style=&quot;color: #0000ff&quot;&gt;enum&lt;/span&gt; CardTypes { Debit = 1, Credit = 3, Virtual = 5 }
&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;Void types&lt;/h2&gt;
&lt;p&gt;In general, this type of data types are used in functions that do not return any value. For example, &lt;code&gt;function showMessage(): void { ... }&lt;/code&gt;. In TypeScript, you can also declare a variable of type &lt;code&gt;void&lt;/code&gt;, but can only assign &lt;code&gt;undefined&lt;/code&gt; or &lt;code&gt;null&lt;/code&gt; to them. We will discuss about &lt;code&gt;undefined&lt;/code&gt; and &lt;code&gt;null&lt;/code&gt; types in the next points.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;Null types&lt;/h2&gt;
&lt;p&gt;You can declare a variable of type &lt;code&gt;null&lt;/code&gt; using the &lt;code&gt;null&lt;/code&gt; keyword and can assign only &lt;code&gt;null&lt;/code&gt; value to it. As &lt;code&gt;null&lt;/code&gt; is a subtype of all other types, you can assign it to a &lt;code&gt;number&lt;/code&gt; or a &lt;code&gt;boolean&lt;/code&gt; value.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;
&lt;div style=&quot;background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;let&lt;/span&gt; nullValue: &lt;span style=&quot;color: #2b91af&quot;&gt;null&lt;/span&gt; = &lt;span style=&quot;color: #0000ff&quot;&gt;null&lt;/span&gt;;
&lt;span style=&quot;color: #0000ff&quot;&gt;let&lt;/span&gt; numericValue: &lt;span style=&quot;color: #2b91af&quot;&gt;number&lt;/span&gt; = &lt;span style=&quot;color: #0000ff&quot;&gt;null&lt;/span&gt;;
&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p class=&quot;infoGreen&quot;&gt;&lt;a href=&quot;//www.kunal-chowdhury.com/p/typescript-tutorial.html?utm_source=typescript&amp;amp;utm_medium=referral&quot; target=&quot;_blank&quot; alt=&quot;Click here to read TypeScript Tutorial - Getting started with TypeScript&quot; title=&quot;Click here to read TypeScript Tutorial - Getting started with TypeScript&quot;&gt;&lt;font size=&quot;+2&quot;&gt;&lt;strong&gt;👉 TypeScript Tutorial - Getting started with TypeScript&lt;/strong&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;Undefined types&lt;/h2&gt;
&lt;p&gt;You can use &lt;code&gt;undefined&lt;/code&gt; keyword as data type to store value &lt;code&gt;undefined&lt;/code&gt; to it. As &lt;code&gt;undefined&lt;/code&gt; is a subtype of all other types, just like &lt;code&gt;null&lt;/code&gt;, you can assign it to a &lt;code&gt;number&lt;/code&gt; or a &lt;code&gt;boolean&lt;/code&gt; value.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;
&lt;div style=&quot;background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;let&lt;/span&gt; undefinedValue: &lt;span style=&quot;color: #2b91af&quot;&gt;undefined&lt;/span&gt; = &lt;span style=&quot;color: #0000ff&quot;&gt;undefined&lt;/span&gt;;
&lt;span style=&quot;color: #0000ff&quot;&gt;let&lt;/span&gt; numericValue: &lt;span style=&quot;color: #2b91af&quot;&gt;number&lt;/span&gt; = &lt;span style=&quot;color: #0000ff&quot;&gt;undefined&lt;/span&gt;;
&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;Any types&lt;/h2&gt;
&lt;p&gt;While writing code you are unsure of the data type of a value, due to its dynamic content, you can use the keyword &lt;code&gt;any&lt;/code&gt; to declare the said variable. This is often useful when you are seeking input from user or a 3rd party library/service. This is also useful when you are declaring an array which has a mixed data type. It&#39;s just like the &lt;code&gt;dynamic&lt;/code&gt; keyword available in C#. For example,&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;
&lt;div style=&quot;background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;let&lt;/span&gt; dynamicValue: &lt;span style=&quot;color: #2b91af&quot;&gt;any&lt;/span&gt; = &lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Kunal Chowdhury&amp;quot;&lt;/span&gt;;
dynamicValue = 100;
dynamicValue = 0b1100101;
dynamicValue = &lt;span style=&quot;color: #0000ff&quot;&gt;true&lt;/span&gt;;

&lt;span style=&quot;color: #0000ff&quot;&gt;let&lt;/span&gt; dynamicList: &lt;span style=&quot;color: #2b91af&quot;&gt;any&lt;/span&gt;[] = [ &lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Kunal Chowdhury&amp;quot;&lt;/span&gt;,
                           &lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Free User&amp;quot;&lt;/span&gt;,
                           21,
                           &lt;span style=&quot;color: #0000ff&quot;&gt;true&lt;/span&gt;
                         ];
&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;Never types&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;never&lt;/code&gt; type represents the data type of values that never occur. For example, the following function that always throws an exception, can never return a value. Thus, the return type of the function can be set as &lt;code&gt;never&lt;/code&gt;. Here&#39;s the function declaration:&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;
&lt;div style=&quot;background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;function&lt;/span&gt; throwError(message: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;): never {
    &lt;span style=&quot;color: #0000ff&quot;&gt;throw&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; Error(message);
}
&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;Array types&lt;/h2&gt;
&lt;p&gt;Just like JavaScript, you can work with arrays in TypeScript and can define it in either of the following two ways where the second approach is the more generic way to declare arrays:&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;
&lt;div style=&quot;background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;let&lt;/span&gt; marks: &lt;span style=&quot;color: #2b91af&quot;&gt;number&lt;/span&gt;[] = [80, 85, 75];
&lt;span style=&quot;color: #0000ff&quot;&gt;let&lt;/span&gt; marks: &lt;span style=&quot;color: #2b91af&quot;&gt;Array&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #2b91af&quot;&gt;number&lt;/span&gt;&amp;gt; = [80, 85, 75];
&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;Tuple types&lt;/h2&gt;
&lt;p&gt;Tuple is a data type that allows you to create an array where the type of a fixed number of elements are known but need not be same. While accessing an element of a Tuple with a valid known index, the data of correct type will be returned. In case you access an element outside the set of known indices, a union type will be used. Consider the following code snippet as an example:&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;
&lt;div style=&quot;background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #008000&quot;&gt;// correct&lt;/span&gt;
&lt;span style=&quot;color: #0000ff&quot;&gt;let&lt;/span&gt; person: [&lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;, &lt;span style=&quot;color: #2b91af&quot;&gt;number&lt;/span&gt;] = [&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Kunal&amp;quot;&lt;/span&gt;, 2018];

&lt;span style=&quot;color: #008000&quot;&gt;// error&lt;/span&gt;
&lt;span style=&quot;color: #0000ff&quot;&gt;let&lt;/span&gt; person: [&lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;, &lt;span style=&quot;color: #2b91af&quot;&gt;number&lt;/span&gt;] = [2018, &lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Kunal&amp;quot;&lt;/span&gt;];

&lt;span style=&quot;color: #008000&quot;&gt;// correct&lt;/span&gt;
&lt;span style=&quot;color: #0000ff&quot;&gt;let&lt;/span&gt; person: [&lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;, &lt;span style=&quot;color: #2b91af&quot;&gt;number&lt;/span&gt;] = [&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Kunal&amp;quot;&lt;/span&gt;, 2018, &lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;India&amp;quot;&lt;/span&gt;];

&lt;span style=&quot;color: #008000&quot;&gt;// correct&lt;/span&gt;
&lt;span style=&quot;color: #0000ff&quot;&gt;let&lt;/span&gt; person: [&lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;, &lt;span style=&quot;color: #2b91af&quot;&gt;number&lt;/span&gt;] = [&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Kunal&amp;quot;&lt;/span&gt;, 2018, 21];

&lt;span style=&quot;color: #008000&quot;&gt;// error&lt;/span&gt;
&lt;span style=&quot;color: #0000ff&quot;&gt;let&lt;/span&gt; person: [&lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;, &lt;span style=&quot;color: #2b91af&quot;&gt;number&lt;/span&gt;] = [&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Kunal&amp;quot;&lt;/span&gt;, 2018, &lt;span style=&quot;color: #0000ff&quot;&gt;true&lt;/span&gt;];
&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p class=&quot;infoGreen&quot;&gt;&lt;a href=&quot;//www.kunal-chowdhury.com/p/typescript-tutorial.html?utm_source=typescript&amp;amp;utm_medium=referral&quot; target=&quot;_blank&quot; alt=&quot;Click here to read TypeScript Tutorial - Getting started with TypeScript&quot; title=&quot;Click here to read TypeScript Tutorial - Getting started with TypeScript&quot;&gt;&lt;font size=&quot;+2&quot;&gt;&lt;strong&gt;👉 TypeScript Tutorial - Getting started with TypeScript&lt;/strong&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;a href=&quot;https://www.kunal-chowdhury.com&quot; rel=&quot;tag&quot; style=&quot;display:none&quot;&gt;CodeProject&lt;/a&gt;
</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/2452629445557820138/posts/default/1892925338040975624'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/2452629445557820138/posts/default/1892925338040975624'/><link rel='alternate' type='text/html' href='https://www.kunal-chowdhury.com/2018/05/typescript-tutorial-data-types.html' title='What are the basic data types in TypeScript? -- TypeScript Tutorial for beginners'/><author><name>Kunal Chowdhury</name><uri>http://www.blogger.com/profile/12654622239949849381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOTnHIowcCkl4SlL03SZpGsI5syIogU76TpWaG0KRlJh8xKjfh9a9HWA-IDVNGfg6e2-VVrPqXC9QYilN0EhUA3nQ01eesGpjgSsCJVfnyz7-vi8wQXrQvqE-pnObd8uS7IwXyMdhY_yA/s72-c/typescript-tutorial-data-types-thumbnail.jpg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-2452629445557820138.post-2542249780272718632</id><published>2018-05-14T06:00:00.000+05:30</published><updated>2018-06-21T22:15:52.261+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="CodeProject"/><category scheme="http://www.blogger.com/atom/ns#" term="DZone"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="Learn Angular from scratch"/><category scheme="http://www.blogger.com/atom/ns#" term="Node.js"/><category scheme="http://www.blogger.com/atom/ns#" term="Tutorial"/><category scheme="http://www.blogger.com/atom/ns#" term="TypeScript"/><category scheme="http://www.blogger.com/atom/ns#" term="TypeScript Tutorial"/><category scheme="http://www.blogger.com/atom/ns#" term="TypeScript Tutorial for beginners"/><title type='text'>How to declare variables in TypeScript? -- TypeScript Tutorial for beginners</title><content type='html'>&lt;p&gt;In the previous few chapters of the TypeScript Tutorial series we have learned &lt;a href=&quot;//www.kunal-chowdhury.com/2018/05/typescript-tutorial-installation.html?utm_source=typescript&amp;amp;utm_medium=referral&quot; target=&quot;_blank&quot;&gt;how to install TypeScript&lt;/a&gt; and then begin with &lt;a href=&quot;//www.kunal-chowdhury.com/2018/05/typescript-tutorial-helloworld.html?utm_source=typescript&amp;amp;utm_medium=referral&quot; target=&quot;_blank&quot;&gt;creating a simple HelloWorld application&lt;/a&gt;. We have also learned about &lt;a href=&quot;//www.kunal-chowdhury.com/2018/05/typescript-tutorial-tsconfig-json.html?utm_source=typescript&amp;amp;utm_medium=referral&quot; target=&quot;_blank&quot;&gt;&lt;b&gt;TypeScript configuration file&lt;/b&gt;&lt;/a&gt; (&lt;code&gt;tsconfig.json&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;In this chapter we will learn various ways to declare variables in TypeScript. Continue reading to learn more about it.&lt;/p&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNwIg4Ar45d1yfjkMqyo30nbsQJq4mkkCbYFyKtTr-eRJc0ll54Y0hPF-GK_5aBpDHo4KZutt4MHMWddI40xCGP512bNlOt4NtlgTi-UrsviymmVE-86zPEvlGz2z0gYAjdglqHw2v9oA/s1600/typescript-tutorial-variable-declaration-thumbnail.jpg&quot; style=&quot;display:none;&quot;/&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAIIaWyIxmBKYQkO0Ei3l2GZMSkBjBcWZHklo-B02LPFJ1bMIiE50RZyyHNkfDR87I18Weuddbv_HSP6gnMBrUr1Tb9HzDTEJ-8iqwyErDrBz8LPT4Six75FvzZg5iUpMHJnekv2DAYMw/s1600/typescript-tutorial-variable-declaration.jpg&quot; class=&quot;postImage&quot; alt=&quot;Getting started with TypeScript -- Variable declaration&quot; title=&quot;Getting started with TypeScript -- Variable declaration&quot;/&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p class=&quot;infoGreen&quot;&gt;&lt;a href=&quot;//www.kunal-chowdhury.com/p/typescript-tutorial.html?utm_source=typescript&amp;utm_medium=referral&quot; target=&quot;_blank&quot; alt=&quot;Click here to read TypeScript Tutorial - Getting started with TypeScript&quot; title=&quot;Click here to read TypeScript Tutorial - Getting started with TypeScript&quot;&gt;&lt;font size=&quot;+2&quot;&gt;&lt;strong&gt;👉 TypeScript Tutorial - Getting started with TypeScript&lt;/strong&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;Declaring variables with &quot;&lt;b&gt;var&lt;/b&gt;&quot; keyword&lt;/h2&gt;
&lt;p&gt;Just like JavaScript, you can also define variables in TypeScript using the keyword &lt;code&gt;var&lt;/code&gt;. For example, &lt;code&gt;var message = &quot;Hello World!&quot;;&lt;/code&gt;. Defining variables using the &lt;code&gt;var&lt;/code&gt; keyword has some problems and most of the developers face this issue. Let&#39;s take few examples to understand it in better way.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;You can define a variable inside a block and use it outside the scope, like this:&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;
&lt;div style=&quot;background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;function&lt;/span&gt; GetValue(initialize: &lt;span style=&quot;color: #2b91af&quot;&gt;boolean&lt;/span&gt;) {
    &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (initialize) {
        &lt;span style=&quot;color: #0000ff&quot;&gt;var&lt;/span&gt; value = 100;
    }

    &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; value;
}

GetValue(&lt;span style=&quot;color: #0000ff&quot;&gt;true&lt;/span&gt;);  &lt;span style=&quot;color: #008000&quot;&gt;// returns &amp;quot;100&amp;quot;&lt;/span&gt;
GetValue(&lt;span style=&quot;color: #0000ff&quot;&gt;false&lt;/span&gt;); &lt;span style=&quot;color: #008000&quot;&gt;// returns &amp;quot;undefined&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Using the &lt;code&gt;var&lt;/code&gt; keyword, you can declare the same variable multiple times within the same code block. For example, the following code will execute without any error:&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;
&lt;div style=&quot;background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;function&lt;/span&gt; GetValue(value, condition) {
    &lt;span style=&quot;color: #0000ff&quot;&gt;var&lt;/span&gt; value = 10;
    ...
    ...
    &lt;span style=&quot;color: #0000ff&quot;&gt;var&lt;/span&gt; value = 25; &lt;span style=&quot;color: #008000&quot;&gt;// no error&lt;/span&gt;
    ...
    ...
    &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (condition) {
        &lt;span style=&quot;color: #0000ff&quot;&gt;var&lt;/span&gt; value = 100; &lt;span style=&quot;color: #008000&quot;&gt;// no error&lt;/span&gt;
        ...
    }
}
&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;Declaring variables with &quot;&lt;b&gt;let&lt;/b&gt;&quot; keyword&lt;/h2&gt;
&lt;p&gt;To overcome the problems that arises with variable declaration using the &lt;code&gt;var&lt;/code&gt; keyword, TypeScript introduces variable declaration using &lt;code&gt;let&lt;/code&gt; keyword. You can write the &lt;code&gt;let&lt;/code&gt; statements the same way that you write the &lt;code&gt;var&lt;/code&gt; statements. For example, &lt;code&gt;let message = &quot;Hello World!&quot;;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Unlike &lt;code&gt;var&lt;/code&gt;, the &lt;code&gt;let&lt;/code&gt; statement uses block-scoping. That means, if you declare a variable with &lt;code&gt;let&lt;/code&gt; keyword in a function or a block, the scope of the variable will be limited to the same function or code block and won&#39;t be accessible outside of their nearest containing block.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;
&lt;div style=&quot;background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;function&lt;/span&gt; GetValue(initialize: &lt;span style=&quot;color: #2b91af&quot;&gt;boolean&lt;/span&gt;) {
    &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (initialize) {
        &lt;span style=&quot;color: #0000ff&quot;&gt;var&lt;/span&gt; value = 100;
    }

    &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; value; &lt;span style=&quot;color: #008000&quot;&gt;// error&lt;/span&gt;
}
&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;


&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;It&#39;s also a point to note that, you can&#39;t redeclare a variable using &lt;code&gt;let&lt;/code&gt; keyword within the same scope, which was a problem with &lt;code&gt;var&lt;/code&gt; declaration. The following code will throw error during compile time:&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;
&lt;div style=&quot;background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;function&lt;/span&gt; GetValue(condition) {
    &lt;span style=&quot;color: #0000ff&quot;&gt;let&lt;/span&gt; value = 10;
    ...
    ...
    &lt;span style=&quot;color: #0000ff&quot;&gt;let&lt;/span&gt; value = 25; &lt;span style=&quot;color: #008000&quot;&gt;// ERROR: re-declaration of &amp;quot;value&amp;quot;&lt;/span&gt;
    ...
    ...
    &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (condition) {
        &lt;span style=&quot;color: #0000ff&quot;&gt;let&lt;/span&gt; value = 100;
        ...
    }
}
&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;Declaring variables with &quot;&lt;b&gt;const&lt;/b&gt;&quot; keyword&lt;/h2&gt;
&lt;p&gt;You can also declare variables using the &lt;code&gt;const&lt;/code&gt; keyword. For example, &lt;code&gt;const message = &quot;Hello World!&quot;;&lt;/code&gt;. The &lt;code&gt;const&lt;/code&gt; keyword acts like &lt;code&gt;let&lt;/code&gt; but with a difference that their values cannot be changed after they are initialized and hence you cannot re-assign values to them.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p class=&quot;infoGreen&quot;&gt;&lt;a href=&quot;//www.kunal-chowdhury.com/p/typescript-tutorial.html?utm_source=typescript&amp;utm_medium=referral&quot; target=&quot;_blank&quot; alt=&quot;Click here to read TypeScript Tutorial - Getting started with TypeScript&quot; title=&quot;Click here to read TypeScript Tutorial - Getting started with TypeScript&quot;&gt;&lt;font size=&quot;+2&quot;&gt;&lt;strong&gt;👉 TypeScript Tutorial - Getting started with TypeScript&lt;/strong&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;a href=&quot;https://www.kunal-chowdhury.com&quot; rel=&quot;tag&quot; style=&quot;display:none&quot;&gt;CodeProject&lt;/a&gt;
</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/2452629445557820138/posts/default/2542249780272718632'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/2452629445557820138/posts/default/2542249780272718632'/><link rel='alternate' type='text/html' href='https://www.kunal-chowdhury.com/2018/05/typescript-tutorial-variable-declaration.html' title='How to declare variables in TypeScript? -- TypeScript Tutorial for beginners'/><author><name>Kunal Chowdhury</name><uri>http://www.blogger.com/profile/12654622239949849381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNwIg4Ar45d1yfjkMqyo30nbsQJq4mkkCbYFyKtTr-eRJc0ll54Y0hPF-GK_5aBpDHo4KZutt4MHMWddI40xCGP512bNlOt4NtlgTi-UrsviymmVE-86zPEvlGz2z0gYAjdglqHw2v9oA/s72-c/typescript-tutorial-variable-declaration-thumbnail.jpg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-2452629445557820138.post-9088263029541279111</id><published>2018-05-12T06:00:00.000+05:30</published><updated>2018-06-21T22:15:52.601+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="CodeProject"/><category scheme="http://www.blogger.com/atom/ns#" term="DZone"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="Learn Angular from scratch"/><category scheme="http://www.blogger.com/atom/ns#" term="Node.js"/><category scheme="http://www.blogger.com/atom/ns#" term="Tutorial"/><category scheme="http://www.blogger.com/atom/ns#" term="TypeScript"/><category scheme="http://www.blogger.com/atom/ns#" term="TypeScript Tutorial"/><category scheme="http://www.blogger.com/atom/ns#" term="TypeScript Tutorial for beginners"/><title type='text'>What is tsconfig.json configuration file? -- TypeScript Tutorial for beginners</title><content type='html'>&lt;p&gt;The &lt;code&gt;tsconfig.json&lt;/code&gt; file allows you to specify the root level files and the compiler options that requires to compile a TypeScript project. The presence of this file in a directory specifies that the said directory is the TypeScript project root.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;In this chapter of the TypeScript Tutorial series we will learn about &lt;code&gt;tsconfig.json&lt;/code&gt;, it&#39;s various properties and how to extend it.&lt;/p&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwzJrq50zd_FVylqjAymX_IqO1rp6HM9mlMEA1qI43og-Ch8OeBLf8beT2PsWVZU6bvsJNEn58sPm5zlRsq9gWkTPzThMcuqxG5KzXaFeFDo8n4YOUixs1sXdpNXadv9Fh78HJLubN2aw/s1600/typescript-configuration-file-tsconfig-json-thumbnail.jpg&quot; style=&quot;display:none;&quot;/&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-XZlRtRmF8NILU5OCkEcRQZRNgYF_r_0BX0Z4zIwkMrMtuZrNs139ZErKRGyWczS_2_FU22U2I4kPIgEFnpjxBCH6Oq-RT_RdO5Eolu7HJZbAfdHQv3O5e5ttkgUxbmfJUizs0lZI5k8/s1600/typescript-configuration-file-tsconfig-json.jpg&quot; class=&quot;postImage&quot; alt=&quot;Getting started with TypeScript -- What is tsconfig.json configuration file?&quot; title=&quot;Getting started with TypeScript -- What is tsconfig.json configuration file?&quot;/&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p class=&quot;infoGreen&quot;&gt;&lt;a href=&quot;//www.kunal-chowdhury.com/p/typescript-tutorial.html?utm_source=typescript&amp;utm_medium=referral&quot; target=&quot;_blank&quot; alt=&quot;Click here to read TypeScript Tutorial - Getting started with TypeScript&quot; title=&quot;Click here to read TypeScript Tutorial - Getting started with TypeScript&quot;&gt;&lt;font size=&quot;+2&quot;&gt;&lt;strong&gt;👉 TypeScript Tutorial - Getting started with TypeScript&lt;/strong&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;In the previous chapters of this TypeScript Tutorial series we learned &lt;a href=&quot;//www.kunal-chowdhury.com/2018/05/typescript-tutorial-installation.html&quot; target=&quot;_blank&quot; alt=&quot;How to install Node.js and TypeScript&quot; title=&quot;How to install Node.js and TypeScript&quot;&gt;&lt;b&gt;how to install Node.js and TypeScript&lt;/b&gt;&lt;/a&gt;, followed by &lt;a href=&quot;//www.kunal-chowdhury.com/2018/05/typescript-tutorial-helloworld.html&quot; target=&quot;_blank&quot; alt=&quot;Building your first HelloWorld application&quot; title=&quot;Building your first HelloWorld application&quot;&gt;&lt;b&gt;building your first HelloWorld application&lt;/b&gt;&lt;/a&gt; in TypeScript using Visual Studio Code. Today in this article, let&#39;s go one step ahead to learn about &lt;code&gt;tsconfig.json&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;The &quot;&lt;b&gt;compilerOptions&lt;/b&gt;&quot; property&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;&quot;compilerOptions&quot;&lt;/code&gt; property allows you to specify additional options to the TypeScript compiler. Here&#39;s a list of few optional settings part of the &lt;code&gt;compilerOptions&lt;/code&gt; property that you may need most of the time: &lt;code&gt;listFiles&lt;/code&gt;, &lt;code&gt;module&lt;/code&gt;, &lt;code&gt;outDir&lt;/code&gt;, &lt;code&gt;outFile&lt;/code&gt;, &lt;code&gt;rootDir&lt;/code&gt;, &lt;code&gt;sourceRoot&lt;/code&gt;, &lt;code&gt;allowUnreachableCode&lt;/code&gt;, &lt;code&gt;allowJs&lt;/code&gt;, &lt;code&gt;noImplicitUseStrict&lt;/code&gt;, &lt;code&gt;strictNullChecks&lt;/code&gt; and more.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Here&#39;s a sample JSON file describing how you can define a &lt;code&gt;tsconfig.json&lt;/code&gt; file containing different parameters of the &lt;code&gt;compilerOptions&lt;/code&gt; property:&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;
&lt;div style=&quot;background: #f0f0f0; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;{
    &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;compilerOptions&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #666666&quot;&gt;:&lt;/span&gt; {
        &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;module&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #666666&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;system&amp;quot;&lt;/span&gt;,
        &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;noImplicitAny&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #666666&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #007020; font-weight: bold&quot;&gt;true&lt;/span&gt;,
        &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;removeComments&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #666666&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #007020; font-weight: bold&quot;&gt;true&lt;/span&gt;,
        &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;allowUnreachableCode&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #666666&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #007020; font-weight: bold&quot;&gt;false&lt;/span&gt;,
        &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;strictNullChecks&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #666666&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #007020; font-weight: bold&quot;&gt;true&lt;/span&gt;,
        &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;outFile&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #666666&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;../JS/TypeScript/HelloWorld.js&amp;quot;&lt;/span&gt;,
        &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;sourceMap&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #666666&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #007020; font-weight: bold&quot;&gt;true&lt;/span&gt;
    }
}
&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;The &quot;&lt;b&gt;compileOnSave&lt;/b&gt;&quot; property&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;&quot;compileOnSave&quot;&lt;/code&gt; property can be used to direct the IDE to automatically compile the included TypeScript files and generate the output. Here&#39;s how you can define the &lt;code&gt;compileOnSave&lt;/code&gt; property inside a &lt;code&gt;tsconfig.json&lt;/code&gt; file, along with the other properties:&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;
&lt;div style=&quot;background: #f0f0f0; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;{
   &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;compileOnSave&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #666666&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #007020; font-weight: bold&quot;&gt;true&lt;/span&gt;,
   &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;compilerOptions&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #666666&quot;&gt;:&lt;/span&gt; {
        &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;module&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #666666&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;system&amp;quot;&lt;/span&gt;,
        &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;noImplicitAny&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #666666&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #007020; font-weight: bold&quot;&gt;true&lt;/span&gt;,
        &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;removeComments&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #666666&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #007020; font-weight: bold&quot;&gt;true&lt;/span&gt;,
        &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;allowUnreachableCode&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #666666&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #007020; font-weight: bold&quot;&gt;false&lt;/span&gt;,
        &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;strictNullChecks&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #666666&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #007020; font-weight: bold&quot;&gt;true&lt;/span&gt;,
        &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;outFile&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #666666&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;../JS/TypeScript/HelloWorld.js&amp;quot;&lt;/span&gt;,
        &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;sourceMap&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #666666&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #007020; font-weight: bold&quot;&gt;true&lt;/span&gt;
   }
}
&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;The &quot;&lt;b&gt;files&lt;/b&gt;&quot;, &quot;&lt;b&gt;include&lt;/b&gt;&quot; and &quot;&lt;b&gt;exclude&lt;/b&gt;&quot; properties&lt;/h2&gt;
&lt;p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;&quot;files&quot;&lt;/code&gt; property allows you to specify a list of TypeScript files that will be included by the compiler. The URL of the files can be relative or absolute.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;&quot;include&quot;&lt;/code&gt; property allows you to include a list of TypeScript files using the glob wildcards pattern.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;&quot;exclude&quot;&lt;/code&gt; property allows you to exclude a list of TypeScript files using the glob wildcards pattern.&lt;/li&gt;
&lt;li&gt;When you don&#39;t specify both the &lt;code&gt;files&lt;/code&gt; and &lt;code&gt;include&lt;/code&gt; properties, the compiler includes all TypeScript files (&lt;code&gt;*.ts&lt;/code&gt;, &lt;code&gt;*.d.ts&lt;/code&gt;, &lt;code&gt;*.tsx&lt;/code&gt;) by default.&lt;/li&gt;
&lt;li&gt;When both the &lt;code&gt;files&lt;/code&gt; and &lt;code&gt;include&lt;/code&gt; properties are specified, the compiler includes the union of the specified files.&lt;/li&gt;
&lt;li&gt;When you want to filter out some files included using the &lt;code&gt;include&lt;/code&gt; property, you can specify &lt;code&gt;exclude&lt;/code&gt; property.&lt;/li&gt;
&lt;li&gt;If you specify any files using the &lt;code&gt;files&lt;/code&gt; property, the uses of &lt;code&gt;exclude&lt;/code&gt; property will not have any impact to those listed files. In short, the files included using the &lt;code&gt;files&lt;/code&gt; property will always include regardless the files listed under the &lt;code&gt;exclude&lt;/code&gt; property.&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Here&#39;s the code snippet describing how you can define the &lt;code&gt;files&lt;/code&gt;, &lt;code&gt;include&lt;/code&gt; and &lt;code&gt;exclude&lt;/code&gt; properties inside a &lt;code&gt;tsconfig.json&lt;/code&gt; file, along with the other properties:&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;
&lt;div style=&quot;background: #f0f0f0; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;{
   &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;compileOnSave&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #666666&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #007020; font-weight: bold&quot;&gt;true&lt;/span&gt;,
   &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;compilerOptions&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #666666&quot;&gt;:&lt;/span&gt; {
        &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;module&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #666666&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;system&amp;quot;&lt;/span&gt;,
        &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;noImplicitAny&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #666666&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #007020; font-weight: bold&quot;&gt;true&lt;/span&gt;,
        &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;removeComments&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #666666&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #007020; font-weight: bold&quot;&gt;true&lt;/span&gt;,
        &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;allowUnreachableCode&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #666666&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #007020; font-weight: bold&quot;&gt;false&lt;/span&gt;,
        &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;strictNullChecks&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #666666&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #007020; font-weight: bold&quot;&gt;true&lt;/span&gt;,
        &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;outFile&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #666666&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;../JS/TypeScript/HelloWorld.js&amp;quot;&lt;/span&gt;,
        &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;sourceMap&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #666666&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #007020; font-weight: bold&quot;&gt;true&lt;/span&gt;
   },
    &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;files&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #666666&quot;&gt;:&lt;/span&gt; [
        &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;program.ts&amp;quot;&lt;/span&gt;,
        &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;sys.ts&amp;quot;&lt;/span&gt;
    ],
    &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;include&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #666666&quot;&gt;:&lt;/span&gt; [
        &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;src/**/*&amp;quot;&lt;/span&gt;
    ],
    &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;exclude&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #666666&quot;&gt;:&lt;/span&gt; [
        &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;node_modules&amp;quot;&lt;/span&gt;,
        &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;src/**/*.spec.ts&amp;quot;&lt;/span&gt;
    ]
}
&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;Extending the &quot;&lt;b&gt;tsconfig.json&lt;/b&gt;&quot; file&lt;/h2&gt;
&lt;p&gt;You can also extend a TypeScript configuration file from a different base configuration. You can do so by using the &lt;code&gt;extends&lt;/code&gt; property. It accepts a string value containing a path to another configuration file to inherit from. The configuration from the base file are loaded first, then overridden by those in the inheriting config file. In case there is a circular references, TypeScript compiler will return an error.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;
&lt;div style=&quot;background: #f0f0f0; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #ff0000; font-style: italic&quot;&gt;// tsconfig-base.json&lt;/span&gt;
{
    &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;compilerOptions&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #666666&quot;&gt;:&lt;/span&gt; {
        &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;module&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #666666&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;system&amp;quot;&lt;/span&gt;,
        &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;noImplicitAny&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #666666&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #007020; font-weight: bold&quot;&gt;true&lt;/span&gt;,
        &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;removeComments&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #666666&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #007020; font-weight: bold&quot;&gt;true&lt;/span&gt;,
        &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;allowUnreachableCode&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #666666&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #007020; font-weight: bold&quot;&gt;false&lt;/span&gt;,
        &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;strictNullChecks&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #666666&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #007020; font-weight: bold&quot;&gt;true&lt;/span&gt;
    }
}

&lt;span style=&quot;color: #ff0000; font-style: italic&quot;&gt;// tsconfig.json&lt;/span&gt;
{
    &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;extends&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #666666&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;./tsconfig-base&amp;quot;&lt;/span&gt;,
    &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;compilerOptions&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #666666&quot;&gt;:&lt;/span&gt; {
        &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;outFile&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #666666&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;../JS/TypeScript/HelloWorld.js&amp;quot;&lt;/span&gt;,
        &lt;span style=&quot;color: #4070a0&quot;&gt;&amp;quot;sourceMap&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #666666&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #007020; font-weight: bold&quot;&gt;true&lt;/span&gt;
    }
}
&lt;/pre&gt;&lt;/div&gt;
&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p class=&quot;infoGreen&quot;&gt;&lt;a href=&quot;//www.kunal-chowdhury.com/p/typescript-tutorial.html?utm_source=typescript&amp;utm_medium=referral&quot; target=&quot;_blank&quot; alt=&quot;Click here to read TypeScript Tutorial - Getting started with TypeScript&quot; title=&quot;Click here to read TypeScript Tutorial - Getting started with TypeScript&quot;&gt;&lt;font size=&quot;+2&quot;&gt;&lt;strong&gt;👉 TypeScript Tutorial - Getting started with TypeScript&lt;/strong&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;a href=&quot;https://www.kunal-chowdhury.com&quot; rel=&quot;tag&quot; style=&quot;display:none&quot;&gt;CodeProject&lt;/a&gt;
</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/2452629445557820138/posts/default/9088263029541279111'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/2452629445557820138/posts/default/9088263029541279111'/><link rel='alternate' type='text/html' href='https://www.kunal-chowdhury.com/2018/05/typescript-tutorial-tsconfig-json.html' title='What is tsconfig.json configuration file? -- TypeScript Tutorial for beginners'/><author><name>Kunal Chowdhury</name><uri>http://www.blogger.com/profile/12654622239949849381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwzJrq50zd_FVylqjAymX_IqO1rp6HM9mlMEA1qI43og-Ch8OeBLf8beT2PsWVZU6bvsJNEn58sPm5zlRsq9gWkTPzThMcuqxG5KzXaFeFDo8n4YOUixs1sXdpNXadv9Fh78HJLubN2aw/s72-c/typescript-configuration-file-tsconfig-json-thumbnail.jpg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-2452629445557820138.post-299107013884725497</id><published>2018-05-06T06:00:00.000+05:30</published><updated>2018-06-21T22:15:52.331+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="CodeProject"/><category scheme="http://www.blogger.com/atom/ns#" term="DZone"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="Learn Angular from scratch"/><category scheme="http://www.blogger.com/atom/ns#" term="Node.js"/><category scheme="http://www.blogger.com/atom/ns#" term="Tutorial"/><category scheme="http://www.blogger.com/atom/ns#" term="TypeScript"/><category scheme="http://www.blogger.com/atom/ns#" term="TypeScript Tutorial"/><category scheme="http://www.blogger.com/atom/ns#" term="TypeScript Tutorial for beginners"/><title type='text'>Building your first Hello TypeScript application -- TypeScript Tutorial for beginners</title><content type='html'>&lt;p&gt;If you have read the previous chapter of the TypeScript Tutorial series, you have already learned &lt;a href=&quot;//www.kunal-chowdhury.com/2018/05/typescript-tutorial-installation.html&quot; target=&quot;_blank&quot;&gt;&lt;strong&gt;how to install Node.js and TypeScript&lt;/strong&gt;&lt;/a&gt; and might have already installed those. Now, it&#39;s the time to go a step further to learn how to write code in TpeScript.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;In this article, we will learn how to create a simple HelloWorld application, compile it and run it. Continue reading to know more.&lt;/p&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEig9Ls7VW1m44LJwXJ_qEcyFSsa89d_rgbuFNC944OsMSLRVKOuEjatlRq4mFI-O9SIEqHPVaXXWhsJxp4V01sRcnT3JZ1WyBj8YMcv8ByRcBKp2wpiErgb9MslBEr0vRPGWFhUkUtyT2c/s1600/typescript-tutorial-helloworld-thumbnail.jpg&quot; style=&quot;display:none;&quot;/&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhG2uG47MHdZEOX_E7EOMepjHManlbLndjLPXrgXyx_DZpC-fxun7QtiUELx9SYE5aZTkSMW01ZaCiWpTz71y_IEylrfxd5D7kAJB03UtWi143ibHMetZEF6LGZTx4wkLhkrOvMEzYDdKE/s1600/typescript-tutorial-helloworld.jpg&quot; class=&quot;postImage&quot; alt=&quot;Getting started with TypeScript -- Building your first HelloWorld application&quot; title=&quot;Getting started with TypeScript -- Building your first HelloWorld application&quot;/&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p class=&quot;infoGreen&quot;&gt;&lt;a href=&quot;//www.kunal-chowdhury.com/p/typescript-tutorial.html?utm_source=typescript&amp;utm_medium=referral&quot; target=&quot;_blank&quot; alt=&quot;Click here to read TypeScript Tutorial - Getting started with TypeScript&quot; title=&quot;Click here to read TypeScript Tutorial - Getting started with TypeScript&quot;&gt;&lt;font size=&quot;+2&quot;&gt;&lt;strong&gt;👉 TypeScript Tutorial - Getting started with TypeScript&lt;/strong&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;Getting Started&lt;/h2&gt;
&lt;p&gt;You can use Notepad or any other text editor to write TypeScript code. Here, in this series of TypeScript Tutorial, we will be using &lt;keywords&gt;Visual Studio Code&lt;/keywords&gt; editor to demonstrate the each one of the code snippet. You can download Visual Studio Code directly from Microsoft site. Here is the link: &lt;a href=&quot;https://code.visualstudio.com/Download&quot; link-type=&quot;external&quot; ref=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;&lt;b&gt;https://code.visualstudio.com/Download&lt;/b&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Once downloaded, double-click on the installer file and follow the step-by-step instructions to install the Visual Studio Code in your system. Make sure that, you have &lt;a href=&quot;//www.kunal-chowdhury.com/2018/05/typescript-tutorial-installation.html&quot; target=&quot;_blank&quot;&gt;&lt;b&gt;successfully installed the &lt;keywords&gt;Node.js&lt;/keywords&gt; and &lt;keywords&gt;TypeScript&lt;/keywords&gt; in your development environment&lt;/b&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;How to do it...&lt;/h2&gt;
&lt;p&gt;Open the &lt;keywords&gt;Visual Studio Code&lt;/keywords&gt; editor and follow the simple mentioned steps in order to create your first TypeScript application which will print a message in the console output:&lt;/p&gt;

&lt;p&gt;
&lt;ul&gt;
&lt;li&gt;Inside the Visual Studio Code, click on the &lt;screen&gt;New&lt;/screen&gt; icon as shown in the below screenshot:
&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYQEUAjnNoQqqM-ihYHYKSGN-BNnsknSfkOgH0lGuZr49OyIITS9TUMhQZCVy59fvLkTA2lbrbWZ4KCk1A9NkyEHr9bxTfHHHqs02p1aVyZ4YpBFZTnlKa9Mv9gpuHtrGDIClLAdA7jxs/s1600/visual-studio-typescript-create-new-file.jpg&quot; class=&quot;postImage&quot; alt=&quot;Creating a new file inside Visual Studio Code&quot; title=&quot;Creating a new file inside Visual Studio Code&quot;/&gt;&lt;br/&gt;&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;Give the file a name, with an extension &lt;code&gt;.ts&lt;/code&gt;. Let&#39;s name it as &lt;code&gt;HelloWorld.ts&lt;/code&gt;. Visual Studio Code will automatically recognize it as TypeScript file, based on the file extension provided.
&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLYfITQ8dfsa-IxjXt3ELIXr61LsCcL3j81mmBiT3vYpbiHJM2Dx-fiKpeRW2NxBDZBC5ejD3yi1olRZKJBQ6kkHhQ1_4I-_Az8DCzUAr8DLokddersuWKIGYaY1Je1zGDmdyrI8x45pI/s1600/visual-studio-typescript-name-the-file.jpg&quot; class=&quot;postImage&quot; alt=&quot;Name the TypeScript file with an extension as .ts&quot; title=&quot;Name the TypeScript file with an extension as .ts&quot;/&gt;&lt;br/&gt;&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;Now, inside the code editor, enter the following lines of code, which will look similar to the following screenshot:
&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6KbTlFlQql1Maz6Qnn7OztSwJ7-3AxC8LFLpHH4835TN932bZiAupPiHHUsKTnpC48dOwrt5itOODEjnORMwlAzFTxYqMALP2QYu8Yp1s0KgA5z8z7IveE1lCA96E335HzNs1IkXH8nc/s1600/visual-studio-typescript-write-the-code.jpg&quot; class=&quot;postImage&quot; alt=&quot;Write the TypeScript code inside Visual Studio Code&quot; title=&quot;Write the TypeScript code inside Visual Studio Code&quot;/&gt;&lt;/p&gt;
&lt;p&gt;
&lt;div style=&quot;background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;
&lt;span style=&quot;color: #008000&quot;&gt;// define the class with constructor&lt;/span&gt;
&lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; Author {
    &lt;span style=&quot;color: #0000ff&quot;&gt;constructor&lt;/span&gt; (&lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; Name: &lt;span style=&quot;color: #2b91af&quot;&gt;string&lt;/span&gt;) { }
}

&lt;span style=&quot;color: #008000&quot;&gt;// create the instance of the class&lt;/span&gt;
&lt;span style=&quot;color: #0000ff&quot;&gt;let&lt;/span&gt; author = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; Author(&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Kunal Chowdhury&amp;quot;&lt;/span&gt;);

&lt;span style=&quot;color: #008000&quot;&gt;// print the information in the console&lt;/span&gt;
console.log(&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;\nHello Readers,&amp;quot;&lt;/span&gt;);
console.log(&lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;Thanks for visiting my blog&amp;quot;&lt;/span&gt;);
console.log(&lt;span style=&quot;color: #a31515&quot;&gt;`\t~ ${author.Name}`&lt;/span&gt;);
&lt;/pre&gt;&lt;/div&gt;
&lt;br/&gt;
&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;Now open a console window (&lt;code&gt;cmd.exe&lt;/code&gt;) and navigate to the path where you have created the &lt;code&gt;HelloWorld.ts&lt;/code&gt; file.&lt;br/&gt;&lt;br/&gt;&lt;/li&gt;

&lt;li&gt;Inside the console window, enter the following command to compile the TypeScript file (&lt;code&gt;HelloWorld.ts&lt;/code&gt;) and generate the compiler output. &lt;code&gt;tsc&lt;/code&gt; stands for the compiler name, followed by the TypeScript file without extension. This will generate the &lt;code&gt;HelloWorld.js&lt;/code&gt; file within the same directory.
&lt;command&gt;tsc HelloWorld&lt;/command&gt;&lt;br/&gt;&lt;/li&gt;

&lt;li&gt;Now enter the following command in the console window to run the TypeScript code that we have written. Basically, it executes the JavaScript using &lt;code&gt;Node.js&lt;/code&gt; and writes the output on the screen (using the &lt;code&gt;console.log(...)&lt;/code&gt; method).
&lt;command&gt;node HelloWorld&lt;/command&gt;
&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtZIhIjdnXLPaHer4-7oLmuLdSBoNcSXeO_mEItTJ-qwsso4PxlZPnpG_cRJ2pYKJKJhudFeYt5H0BefxNPqsA4IR79llOzc5xpEiC4_lZ21EWp-h3XfGJ7krdxTov_Wwz56TLkmAduZ4/s1600/visual-studio-typescript-compile-and-run-the-code.jpg&quot; class=&quot;postImage&quot; alt=&quot;Compile the TypeScript code to produce JavaScript output and run it&quot; title=&quot;Compile the TypeScript code to produce JavaScript output and run it&quot;/&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;How it works&lt;/h2&gt;
&lt;p&gt;When you compile a TypeScript file (&lt;code&gt;.ts&lt;/code&gt;) using the &lt;code&gt;tsc&lt;/code&gt; compiler, it generates a JavaScript file (&lt;code&gt;.js&lt;/code&gt;). The node command can be used from console window to execute the JavaScript, as we have seen in the above demonstration. The &lt;code&gt;console.log(...)&lt;/code&gt; method is used here to write some strings in the output window. We will discuss all about this in the later parts of the &lt;keywords&gt;TypeScript Tutorial&lt;/keywords&gt;.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p class=&quot;infoGreen&quot;&gt;&lt;a href=&quot;//www.kunal-chowdhury.com/p/typescript-tutorial.html?utm_source=typescript&amp;utm_medium=referral&quot; target=&quot;_blank&quot; alt=&quot;Click here to read TypeScript Tutorial - Getting started with TypeScript&quot; title=&quot;Click here to read TypeScript Tutorial - Getting started with TypeScript&quot;&gt;&lt;font size=&quot;+2&quot;&gt;&lt;strong&gt;👉 TypeScript Tutorial - Getting started with TypeScript&lt;/strong&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;a href=&quot;https://www.kunal-chowdhury.com&quot; rel=&quot;tag&quot; style=&quot;display:none&quot;&gt;CodeProject&lt;/a&gt;

</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/2452629445557820138/posts/default/299107013884725497'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/2452629445557820138/posts/default/299107013884725497'/><link rel='alternate' type='text/html' href='https://www.kunal-chowdhury.com/2018/05/typescript-tutorial-helloworld.html' title='Building your first Hello TypeScript application -- TypeScript Tutorial for beginners'/><author><name>Kunal Chowdhury</name><uri>http://www.blogger.com/profile/12654622239949849381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEig9Ls7VW1m44LJwXJ_qEcyFSsa89d_rgbuFNC944OsMSLRVKOuEjatlRq4mFI-O9SIEqHPVaXXWhsJxp4V01sRcnT3JZ1WyBj8YMcv8ByRcBKp2wpiErgb9MslBEr0vRPGWFhUkUtyT2c/s72-c/typescript-tutorial-helloworld-thumbnail.jpg" height="72" width="72"/></entry></feed>