react-structured-data icon indicating copy to clipboard operation
react-structured-data copied to clipboard

TypeScript typings?

Open ffMathy opened this issue 4 years ago • 1 comments

Would be cool with TypeScript typings.

ffMathy avatar Apr 19 '21 12:04 ffMathy

You can create a type definition for your project.

//react-structured-data.d.ts

declare module 'react-structured-data' {
  declare const JSONLD: React.ComponentType<{
    dangerouslyExposeHtml?: boolean;
  }>;

  declare const AggregateRating: React.ComponentType<{
    ratingValue?: number;
    reviewCount?: number;
    bestRating?: number;
  }>;
}

nghiepdev avatar Jul 14 '21 17:07 nghiepdev