Learn TypeScript in Construct, part 14: Onwards

UpvoteUpvote 5 DownvoteDownvote

Index

Features on these Courses

Stats

180 visits, 223 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY-NC 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 31 Jul, 2025. Last updated 1 Aug, 2025

This is part 14 of the tutorial series Learn TypeScript in Construct. This part continues on from part 13. So in case you missed it, see Learn TypeScript in Construct, part 13: Modules.

We've covered most of the language basics of TypeScript in this guide. However as we noted at the start, this guide does not comprehensively cover the entire language. It would be a much longer guide if it did! TypeScript and JavaScript are a mature languages with a wide ranges of sophisticated features, and are continuously improving over time as well with new additions, performance improvements and more.

This final part of the guide has some closing remarks, a bit of advice, some final details about TypeScript that weren't covered before, and pointers on where to go next. The goal of this guide is to teach you enough that you will now be comfortable using the wide range of other TypeScript resources across the web to learn more and know how to apply it in Construct. We've included a series of links you can use more and suggest what to focus on next. There's a lot you can go in to though, so these are just suggestions - if you know what you want to be working on, you might want to focus on other specific areas relevant to that.

Using JavaScript resources

In this guide we've emphasized the close relationship between TypeScript and JavaScript. It's worth repeating that TypeScript is essentially a type checking layer on top of JavaScript. TypeScript pretty much just uses type annotations to work out if there are mistakes in your code, but when you actually run code it just strips off all the type annotations, and the result is JavaScript code which the browser (or another JavaScript environment) can directly run.

Now you know the basics of TypeScript and its type system, you should be able to make use of JavaScript learning resources to learn more about both language features and the available standard library and browser APIs you can use. In fact throughout this guide we've been linking to the MDN Web Docs in many places, which is a reference for JavaScript. However it's still an excellent resource to learn how things work in TypeScript, as TypeScript can also do basically everything that you can do in JavaScript - after all it just adds a layer of checking on top. For example you can look up the Math object on the MDN Web Docs which describes it in terms of JavaScript, but you can use everything described there in TypeScript too, so long as you call the functions with the expected types (e.g. with the Math object, you'll mostly pass numbers).

Since TypeScript is so closely related to JavaScript, you generally won't find resources that describe things like the Math object in terms of TypeScript specifically. Any such documentation would pretty much just be an exact copy of the corresponding JavaScript documentation. It is assumed you will just refer to existing JavaScript documentation to learn about those features. If you make a mistake in your code, TypeScript will point out the error for you.

As JavaScript is a dynamic language, it can do some things that aren't allowed (or are deliberately made difficult) in TypeScript, such as adding and removing object properties as your code runs. So if referring to resources on the JavaScript language, bear in mind that TypeScript has extra rules that prevent some of these capabilities, mainly to ensure its type checking system is more helpful. Knowing both JavaScript and TypeScript and being clear on the difference between them will be useful when going further, and is not too much to learn - you've already learned much of JavaScript in this guide - just take out the type annotations.

The best resource on TypeScript itself is the official TypeScript Handbook, which also includes a reference. This mostly assumes you know JavaScript and want to know how TypeScript works. However it's the best place to go for a description of how TypeScript itself works, such as what you can do with types, and how TypeScript validates your code.

More guides

This guide has introduced you to the basics of the TypeScript language. There are other guides on the web that go in to detail about every aspect of JavaScript, on which TypeScript is based, as well as all the APIs you can use. You can use these to refresh your knowledge, learn about the topics we covered in this guide in more detail, and learn about new parts of TypeScript this guide did not cover.

Here are some guides that you can take a look at:

  • As we mentioned, the official TypeScript Handbook is the best resource on how TypeScript itself works.
  • The official guide TypeScript for the New Programmer provides further advice for beginners.
  • javascript.info provides a free guide with three major parts going in to detail on the JavaScript language, the browser APIs like the DOM, and an additional part covering extra details like networking and regular expressions.
  • The MDN Web Docs guide on JavaScript is another free reference, focused on web development. This site also provides the JavaScript Reference that we've linked to throughout this guide, as JavaScript is the basis for TypeScript. The MDN Web Docs are the de-facto official reference for web technologies like JavaScript.
  • Learn JavaScript on web.dev is another detailed and free to read course going further than this guide.
  • learnjavascript.online is an interactive online resource for learning JavaScript that provides the first several chapters for free, but note going further requires payment.

Search the web and you'll find loads more resources, both free and paid, such as Codecademy.com, code.org, freeCodeCamp.org, and more.

To learn more about how TypeScript works in Construct, also refer to the scripting section of the documentation. The guides on Coding in Construct, Scripts in event sheets and Script files include important information about how code is used in Construct specifically. The guide on TypeScript in Construct includes further advice about the specifics of TypeScript, as opposed to general advice that covers both. There's also a guide on Debugging script to help you get started with some of the more advanced debugging tools provided by browser's developer tools.

What to learn next

Here are some ideas about what to look in to learning next if you want to expand your knowledge of JavaScript and TypeScript. They are roughly in order of what we would suggest learning next, but you can of course do things your own way, or follow the order provided by other guides.

  • Classes are a fundamental part of programming and provide a wide range of features for object-oriented programming (OOP). If you're not sure where to go next, learning more about classes and everything you can do with them is a good place to move on to. Inheritance is also a key part of OOP which you can use in classes with the extends keyword. If you want to dig in to all the technical details of how inheritance works, see Inheritance and the prototype chain.
  • There are more operators you can use like bitwise ~, &, |, ^; bit shifts << and >>; and nullish coalescing ??.
  • JSON is a useful data format based on how object literals are written in JavaScript. It's also useful in Construct with the JSON plugin. See JSON.parse() and JSON.stringify().
  • Exceptions are a useful way for handling errors. See try...catch and Control flow and error handling.
  • async functions, the await operator, and promises are useful for dealing with asynchronous (i.e. long-running) tasks like downloading resources from the network.
  • Regular expressions provide useful and advanced tools for processing text. Construct also allows these to be used in event sheets with some system expressions.
  • There are lots of Web APIs browsers provide, such as fetch for making network requests, WebSockets for real-time communication, Web Workers for running code in a background thread, Web Crypto for various cryptographic tools, Web Audio for audio playback, and much more.
  • Generics in the TypeScript Handbook covers more about how the generics feature works, which we only covered in brief in this guide and is specific to TypeScript.
  • There are lots of useful coding patterns to learn about such as Immediately Invoked Function Expressions (IIFEs), currying, advanced function methods like bind(), call() and apply(), and plenty more.

Debugging code is also useful to learn to help diagnose code that isn't working correctly. It lets you do things like step through your code line-by-line showing what the values of all the variables are, so you can see exactly what it's doing and where it goes wrong. The Debugging script guide in Construct's manual shows how to get started with that.

Start Page examples

Check out the TypeScript section of the Example Browser, under the 'Coding' category, for some examples based on TypeScript code. These range from basic examples to a fully TypeScript-coded version of the Spell Caster example. Inspecting these will help you learn more about TypeScript and how to use it in Construct.

Getting help

For general programming questions, StackOverflow.com is a well-known resource for asking questions and getting help, as well as an invaluable resource of past questions and answers where you can often find someone else who had the same problem and the answer that solved their problem. These days it's also common to ask for coding help from AI chatbots, which are good at helping with beginner-level problems.

If you have a problem specific to coding in Construct, such as using scripts in event sheets or using Construct's own APIs, try asking in the Scripting forum.

  • 0 Comments

Want to leave a comment? Login or Register an account!