I am just an Aurelia hack here, but wouldn’t that make it a dom global.
I am not sure it is the correct pattern for adding external libraries, but there is a “prepend” section in aurelia_project/aurelia.json where the CLI adds in javascript libraries.
Would still have to get typescript to understand the types for it I think.
There are a number of different ways to work with this. One thing to keep in mind is that some of the jQuery plugins aren’t designed to export modules so you can’t use import { ModuleName } from 'lib';. One method we’ve used was to make sure jQuery was loaded globally since it’s used all over and with many 3rd party libs such as bootstrap. For example, if you are using webpack you can add it to your webpack.config.js like …