I'm using typescript with jquery, but I keep getting
Uncaught TypeError: $ is not a function
Has anybody seen this before?
I'm compiling typescript to ES2017, then transpiling to ES5 using webpack.
//tsconfig
{
"compileOnSave": true,
"compilerOptions": {
"module": "es2015",
"removeComments": true,
"preserveConstEnums": true,
"sourceMap": true,
"target": "es2017",
"noImplicitAny": false,
"outDir": "Output",
"esModuleInterop": true
}
}
How jquery is being used
import * as $ from "jquery";
var form = $(document.createElement('form'));
But then I get this