79109351

Date: 2024-10-21 09:15:44
Score: 0.5
Natty:
Report link

Make sure the file where you're calling let stream = await renderToStream(<TestPDF message={message} />) has the .tsx extension. If the file has a .ts extension, you’ll get the error: 'TestPDF' refers to a value, but is being used as a type here. Did you mean 'typeof TestPDF'?

As a rule of thumb:

  1. Use .ts for files containing only TypeScript.
  2. Use .tsx for files containing JSX.
Reasons:
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: Bruno Kawka