Using TypeScript for WordPress Theme Development and Submission on ThemeForest

I want to create a WordPress theme and I’m considering using TypeScript instead of JavaScript because TypeScript allows for cleaner, more understandable code, easier debugging, and most importantly, it will be easier to update and expand the theme in the future. Can I sell a theme built with these technologies on ThemeForest? If so, how should I structure my directories and which build tools should I use (Vite, Webpack, etc.)? When uploading for sale, do I need to include only the files that the end-user will use, or do I need to upload all files including .ts, .scss, node_modules, etc.?

1 Like