Question: what are ambients in typescript and when to use them?
Answer: Ambient declarations tell the TypeScript compiler about the actual source code (like variable/functions) existing elsewhere. If our TypeScript code needs to use a third-party library that was written in plain JavaScript libraries like jQuery/AngularJS/Node. js, we can always write ambient declarations.