How to prevent TypeScript from interrupting Webpack building on unresolved variables declared on Webpack's ProvidePlugin?

I'm not fully satisfied with ahz's answer as I don't like to install typings globally or declare jQuery as any loosing all typechecking.

The solution that worked for me is to create global.d.ts with following content:

import * as _jQuery from 'jquery';

declare global {
  const jQuery: typeof _jQuery;
  const $: typeof _jQuery;
}

After that tsc passes without any warnings like Cannot find name '$'..

Found here.