Commit b93f05e2 authored by Tomáš Hübelbauer's avatar Tomáš Hübelbauer

Document how to enable importing images in TypeScript

parent a63d0e2a
......@@ -43,3 +43,9 @@ test() {
There is no place the `T` could come from, in JS, it's all but forgotten.
If we did pass an instance of `T` as a parameter, then it could work, but that didn't suit my design,
so I made a different choice in the end.
## Importing images
1. `index.d.ts`: `declare module '*.png';`
2. `index.tsx`: `/// <reference path='./index.d.ts'/>`
3. `index.tsx`: `import checkerboard from './img/checkerboard.png';`
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment