TypeScript support
Opened this issue · 4 comments
Hi,
Would you consider adding support for TypeScript ?
I have this message when I'm trying to use the plugin in a .tsx file :
TS7016: Could not find a declaration file for module 'gatsby-plugin-breadcrumb/'. '****/node_modules/gatsby-plugin-breadcrumb/index.js' implicitly has an 'any' type. Try 'npm i --save-dev @types/gatsby-plugin-breadcrumb' if it exists or add a new declaration (.d.ts) file containing 'declare module 'gatsby-plugin-breadcrumb/';'
Thanks
Thanks for creating an issue! I try to respond as quickly as possible to all issues. If it has been a while feel free to mention me to get my attention.
@RebootGG sure thing! I'll look into creating types for this project. I think you can make this error go away by making a gatsby-plugin-breadcrumb.d.ts
file (name doesn't really matter as long as it ends with d.ts
) with the following:
declare module 'gatsby-plugin-breadcrumb';
As long as the .d.ts
file is anywhere in the folder structure that your project looks for types it should make the error go away until some types can be created.
Thank you, I look forward to that !
As for the workaround, I went with the more straightforward @ts-ignore
, but it will definitely help out some folks around here, so thank you again.