blitzjs.com icon indicating copy to clipboard operation
blitzjs.com copied to clipboard

V2 - Use Typescript

Open abuuzayr opened this issue 3 years ago • 8 comments

Since the initial setup of the V2 site was based on the tailwindcss.com repo, TS is not used. However, @cwray-tech did set it up when converting it to a Blitz repo.

In the spirit of keeping to Blitz.js's style, I think TS should be used.

  • [ ] Convert .js files to .ts
  • [ ] Convert .js files that require jsx tags to .tsx
  • [ ] Add type security
  • [ ] ...

abuuzayr avatar Jan 14 '21 04:01 abuuzayr

@abuuzayr sounds great to me!

cwray-tech avatar Jan 14 '21 04:01 cwray-tech

was wondering if you're converting the files to TypeScript how are you splitting what needs to be done first? @abuuzayr

Mvrs avatar May 18 '21 01:05 Mvrs

thanks @Mvrs would there be any issue if we started anywhere in particular? Sorry, I'm not a well-versed Typescript user..

Probably if there are common/shared types we will need to declare them somewhere first?

abuuzayr avatar May 18 '21 02:05 abuuzayr

@abuuzayr I think first making sure the config files down to the lint tools support ts, tsx file types. Looking at the files that share common types, hooks, and etc.

Mvrs avatar May 18 '21 02:05 Mvrs

ah, i get what you mean. when this issue was created, TS was set up but as of this commit 1f9d0935a1795114c5aea6dde081c72a6fa0d516 they were removed.

so yup you are right, we will have to set it all up again if we wish to use TS.

abuuzayr avatar May 18 '21 02:05 abuuzayr

Interesting... I wonder why the reason to move away from TypeScript before.

Mvrs avatar May 18 '21 04:05 Mvrs

@JuanM04 why did you remove tsconfig awhile back?

flybayer avatar May 19 '21 14:05 flybayer

@flybayer because it wasn't being used. I changed it for a jsconfig knowing that we could recover it with Git

JuanM04 avatar May 19 '21 14:05 JuanM04