3 ms·
I would put `declare` in front of that to avoid generating an unused variable. And for required modules, you'd need to shim require in similar fashion and use
by Arnavion 11y ago
I would put `declare` in front of that to avoid generating an unused variable.
And for required modules, you'd need to shim require in similar fashion and use var instead of import.
declare function require(module: string): any;
var somelib = require("somelib");
- WorldMaker 11y agoOr you can use import and the simple pattern of: declare module "somelib" { var somelib: any export = somelib }