cyrilwanner / next-compose-plugins

💡next-compose-plugins provides a cleaner API for enabling and configuring plugins for next.js
MIT License
736 stars 12 forks source link

Add types for Typescript imports #27

Closed TranquilMarmot closed 4 years ago

TranquilMarmot commented 4 years ago

When doing i.e.

import MyImage from './myimage.png';

The Typescript compiler will complain.

The next-images project solves this by bundling a types declaration file: https://github.com/twopluszero/next-images/blob/master/index.d.ts

And then suggesting that you add a reference in next-env.d.ts: https://github.com/twopluszero/next-images#typescript

cyrilwanner commented 4 years ago

Hi @TranquilMarmot This is the wrong repository, you probably wanted to create it in next-optimize-images, so I'll close it here. And for next-optimized-images: this is planned to be shipped with the next version.