⬅️ FEM TypeScript Fundamentals
Classes
Access modifier keywords (great for encapsulation, but not security!):
-
public
everyone (this is the default) -
protected
the instance itself, and subclasses -
private
only the instance itself -
Classes have fields (data) and methods (functions), both of which need static types. Fortunately, fields use syntax similar to variables, and methods use syntax similar to functions.