Loading topic
this work in JavaScript, and what a class and an instance are. It covers how to declare the data a class holds, how TypeScript decides each field's type, and when initial values are assigned.4 min readthis works in JavaScript functions, and the general idea of a class. It covers how a constructor builds a valid object, the order in which initialization code runs, and the errors that order causes.4 min readthis is bound when they run, and the errors that appear when a method is detached from its o4 min readstrict compiler options. It covers the check that stops a class field from being undefined when its type says it can't be. It also covers the ways to satisfy that check and the case4 min readextends at a conceptual level. Here you will learn what the three access modifiers allow, where they apply, and the mistakes people commonly make with them. Later chapters cover `4 min readthis work, and the general idea of a class. You should also have seen a class with fields, a constructor, and methods. Here you will look at public, the visibility every class member gets when you write nothing.4 min readthis works in JavaScript. It covers what private guarantees, what it does not guarantee, and how to use it to protect the rules your class depends on.4 min readpublic and private modifiers from the earlier chapters. It covers what readonly guarantees, where assignment is allowed, and where the guarantee stops.3 min readpublic, private, protected, and readonly mean. It covers the shorthand that merges a field declaration, a constructor parameter, and an assignment into one place.4 min readprivate and public mean. It covers accessors: getters and setters that look like properties but run code.4 min readpublic, private and protected work on instance members. It covers members that belong to the class itself, and constructors that outside code is not allowed to call.3 min readthis behaves in JavaScript methods, and the basic idea of object-oriented programming. It also assumes you have seen class fields, constructors, and parameter properties.4 min readpublic and private modifiers, and how extends and super work. It covers what protected allows, where it stops, and the rules that cause confusing compiler errors.3 min readextends and super work, what protected means, and how to edit tsconfig.json. Here you will learn how the override modifier makes the compiler check your subclass methods against the base class.4 min readextends and super, and the public, private and protected modifiers from earlier chapters. It covers how abstract classes define a contract plus shared behavior, the compiler rules around them, and the traps that appear at runtime.3 min readpublic, private, and protected. It also assumes you can write a basic interface. Here you will see how a class promises to match an interface, what the compiler checks, and where `impl3 min readprivate keyword, class fields and constructors, and how this behaves in JavaScript methods. It covers the #name syntax, which JavaScript itself enforces at runtime, and the cases where it behaves differently from private.4 min readprivate and protected modifiers, have read the previous chapter on ECMAScript #private fields, and can read basic tsconfig.json options. It explains where each kind of privacy is enforced, what that means for the code you ship, and how to choose between them4 min readpublic, private and protected modifiers, and extends and implements. It explains one rule: a private or protected member changes how TypeScript decides whether one class type can be used where another is expected.3 min read