- Published on
Complete List of TypeScript Keywords
- Authors
- Name
- Yinhuan Yuan
Introduction
TypeScript includes all JavaScript keywords and adds several of its own. Here's a comprehensive list of keywords in TypeScript:
JavaScript Keywords (also used in TypeScript)
break
case
catch
class
const
continue
debugger
default
delete
do
else
enum
export
extends
false
finally
for
function
if
import
in
instanceof
new
null
return
super
switch
this
throw
true
try
typeof
var
void
while
with
as
implements
interface
let
package
private
protected
public
static
yield
TypeScript-Specific Keywords
abstract
any
async
await
constructor
declare
from
get
is
module
namespace
never
require
set
type
unknown
readonly
Contextual Keywords
These words have special meaning in certain contexts but are not reserved words:
of
(used in for...of loops)asserts
(used in type assertions)infer
(used in conditional types)keyof
(used to get the union of keys from a type)
Types
While not strictly keywords, these are built-in types in TypeScript:
boolean
number
string
symbol
object
undefined
bigint
Note: Some keywords like any
, unknown
, never
, etc., are both types and keywords in TypeScript