I have a TypeScript 2 file in which I'm attempting to make use of an image like this:
import image = require("../assets/images/image.jpg");
However, this throws
[at-loader] ./src/components/app.tsx:3:30
TS2532: Object is possibly 'undefined'.
What is the recommended way to make use of an asset without the risk of it being undefined? Note that I don't want to suppress the warning.