What is the TypeScript `declare` keyword used for?

TypeScript Professional Hard

TypeScript Professional — Hard

What is the TypeScript `declare` keyword used for?

Key points

  • `declare` keyword doesn't define variables that will be initialized later
  • It doesn't create abstract class members
  • It doesn't export types from a module

Ready to go further?

Related questions