diff --git a/docs/basic/troubleshooting/non-ts-files.md b/docs/basic/troubleshooting/non-ts-files.md index e5191edf..a1295b72 100644 --- a/docs/basic/troubleshooting/non-ts-files.md +++ b/docs/basic/troubleshooting/non-ts-files.md @@ -20,13 +20,30 @@ Likewise if you wish to "import" an image or other non TS/TSX file: ```ts // declaration.d.ts + +declare module "*.png" { + const value: any; // Adjust the type based on your use case + export = value; +} // anywhere in your project, NOT the same name as any of your .ts/tsx files -declare module "*.png"; +import * as React from 'react'; // importing in a tsx file import * as logo from "./logo.png"; ``` +const MyComponent: React.FC = () => { + return ( +
{window.MyVendorThing}
+