Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use TypeScript for this repo? #121

Open
mrienstra opened this issue Jul 1, 2024 · 2 comments
Open

Use TypeScript for this repo? #121

mrienstra opened this issue Jul 1, 2024 · 2 comments

Comments

@mrienstra
Copy link
Contributor

Now that Fabric.js v6 is chock full of Typescript-y goodness, this new repo might as well be too?

Happy to help. I'd probably start by making a new Astro repo with pnpm create astro@latest (or npm create astro@latest) and select "with Typescript" (or whatever) at the relevant prompt, then diff the two directories and move over a few things.... Well, at least copy over tsconfig.json. I guess the other obvious thing would be adding typescript as a dependency, as of yesterday Astro was using "^5.5.2".

Anyhoo, it might not be too big of a push at this stage. I've tried moving a few of the demos from .js or .jsx to .ts or .tsx, the ones I tried weren't too complicated.

The default Astro tsconfigs can be found here:
https://github.com/withastro/astro/tree/main/packages/astro/tsconfigs

The default option is "strict", which generates a tsconfig.json which looks like:

{
  "extends": "astro/tsconfigs/strict",
  "compilerOptions": {
    "jsx": "react-jsx",
    "jsxImportSource": "react"
  }
}
@asturur
Copy link
Member

asturur commented Jul 6, 2024

i want move fast with this repo, and i m just thinking of the content for now.

@asturur
Copy link
Member

asturur commented Jul 6, 2024

if you think the current repo can be typescript enabled you can try a PR, i don't mind.
I won't put effort in making it happen because i prefer to put down content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants