Yep, complete oversight on my end my apologies. But you definitely pointed me in the right direction.
For anyone in the future struggling with this issue, if this doesn't fix the issue inside your tsconfig.json:
{
"compilerOptions": {
...
},
"files": [
"node_modules/gsap/types/index.d.ts"
]
}
Try adding this to your tsconfig.json.
{
"compilerOptions": {
"declaration": true
}
}
If that doesn't resolve it you may be getting eslint errors and not actually TypeScript errors. To resolve undef errors from eslint add this to your .eslintrc.js file. This won't have a negative impact as TS checks for this already. official explanation
overrides: [
{
files: [
"*.ts",
"*.vue", //or your relevant framework file extensions
],
rules: {
"no-undef": "off",
},
},
],