addDts
allows you to inject a .d.ts
file into the user’s project. It will
create a file inside .astro
and reference it from src/env.d.ts
. For example:
How to generate content
?
Here are a few suggestions regarding how to deal with content
conveniently.
Static content
If content
is a static string and you want to have a nice DX instead of managing it inside a string,
we recommend you use a stub
approach:
Dynamic content
If you want to generate type from user data/input (codegen), you can go for interpolation or a buffer approach.
Interpolation
Buffer
Interpolation