Forge ProjectPage template with Typescript

Hi together,

I create a new app with the ProjectPage template. Here I want use inside the src folder Typescript. But only to change the file extension to ts. Is here a way to use TypeScript with Forge?

Thank you

Hi @bongartz. Sure, there should be no problems with using Typescript. You can create a sample app and forge create should allow you to choose one of the example Typescript apps.

Hi @Dmitrii,

thank you for your answer, but I don’t get the option to create a project with typescript

Select a category: Custom UI
Select a template: jira-project-page

Which template I should use, or do you have a link to a example, so I can look inside the package.json?

Thank you

Hi @bongartz,

To enable typescript, all you should need to do is change your file extension from .js to .ts.


Yes it builds if I change to .ts. But then I get a lot off new errors, if I run forge tunnel. My frontend App is writing with react and typescript. If I build my app all works fine, without forge.

Error: TypeScript errors in the app caused the bundling to fail. Fix the errors listed below before rerunning the command. 
[tsl] ERROR in /app/static/roadmap/src/App.tsx(1,8)
      TS1259: Module '"/app/static/roadmap/node_modules/@types/react/index"' can only be default-imported using the 'esModuleInterop' flag
[tsl] ERROR in /app/static/roadmap/src/App.tsx(12,6)
      TS2304: Cannot find name 'ForgeUI'.