I’m using Bud 16.4.3 and bud-typescript 16.4.3
In my tsconfig it starts with
“extends”: “@roots/bud-typescript/tsconfig/tsconfig.json”,
and I’ve added app.isProduction && app.typescript.typecheck.enable() to the bud.config.js file, this is all running inside Sage which is also running the latest version.
I have a series of .ts files, however I’m getting the errors
error Parsing error: Unexpected token as
and
error Parsing error: Unexpected token :
Where I’m trying to declare variables for Typescript
for example
const top = (section as HTMLElement).querySelector(‘.js-parallax__bgTop’);
or
const backgroundEffect = (section: any) => {
This should be valid TS, so I’m not sure why it’s erroring? any help would be greatly appreciated