title: Typescript types for code that is not imported by typescript?
body: <p>This is an issue with an Angular app, but I don't believe this is an angular-specific issue.</p>
  
  <p>I'm working on an Angular 7 app, and I'm working with a few libraries that are imported via script tags on the front end from other sources (Stripe, recaptcha, googletags, etc). I'll use Stripe as an example here, because Stripe absolutely requires that the front end library be imported from <code>Stripe.js</code> by the client for PCI compliance, so from source server side is not an option. </p>
  
  <p>I've installed the types for <code>Stripe</code> from DefinitelyTyped. If I add <code>declare let Stripe: any;</code> and use <code>Stripe</code> in a component, it works, but of course it is not type safe. If I omit the declaration, VSCode finds the types fine, and the editor catches type errors, but it won't compile, (<code>error TS2304: Cannot find name 'Stripe'.</code> ) presumable because I have no <code>import</code> statement for Stripe.</p>
  
  <p>Is there any way to hint to TypeScript that it should use the types from DefinitelyTyped to catch type errors, without importing the Stripe library itself?</p>
  
  <p>Edit: I take back what I said about not thinking this is Angular specific. I now think this might have something to do with the angular compilation process.</p>