jerkovicl
5/8/2015 - 11:57 AM

TypeScript - Important keywords and operators

TypeScript - Important keywords and operators

KeywordDescription
classContainer for members such as properties and functions
constructorProvides initialization functionality in a class
exportsExport a member from a module
extendsExtend a class or interface
implementsImplement an interface
importsImport a module
interfaceDefines a code contract that can be implemented by types
moduleContainer for classes and other code
public/privateMember visibility modifiers
...Rest parameter syntax
=>Arrow syntax used with definitions and functions
<typeName><> characters use to cast/convert between types
:Separator between variable/parameter names and types
?Operator for optional parameter in function