Is this project going to be typescript only? #361
-
A lot of the documents and samples are only in typescript. This makes it really inconvenient to work with if our project is not in typescript. Is this project going to be typescript only? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
@planetaska I don't believe any part of the project has a hard requirement for Typescript. We just tend to show our examples using it for two reasons:
Take Conic Gradients for example: With a Typescript type added: const conicStops: ConicStop[] = [
{ label: 'Primary', color: 'rgb(var(--color-primary-500))', start: 0, end: 33 },
{ label: 'Acccent', color: 'rgb(var(--color-warning-500))', start: 33, end: 66 },
{ label: 'Warning', color: 'rgb(var(--color-accent-500))', start: 66, end: 100 }
]; Pure Javascript: const conicStops = [
{ label: 'Primary', color: 'rgb(var(--color-primary-500))', start: 0, end: 33 },
{ label: 'Acccent', color: 'rgb(var(--color-warning-500))', start: 33, end: 66 },
{ label: 'Warning', color: 'rgb(var(--color-accent-500))', start: 66, end: 100 }
]; Had we not included Unless there's an example you can reference that is not coming to my mind, this is really the only change needed to use this within a standard Javascript project. If I've missed something let me know and we can discuss though. That said, I'd HIGHLY encourage the use of Typescript given the simplicity of setting it up in Vite/SvelteKit/Astro projects. Plus the benefits you get for strong typing in general. But obviously to each their own! |
Beta Was this translation helpful? Give feedback.
-
By the way, you're only the second person to raise this concern since we launched the project, but I do take this kind of comments seriously. Out of curiosity I'm running a poll on Twitter and Discord asking people which they prefer: https://twitter.com/SkeletonUI/status/1580591588438577153 Feel free to participate, but I'm hoping this sheds light on how people are using and prefer to use these technologies. Either way thanks for reaching out on this! |
Beta Was this translation helpful? Give feedback.
@planetaska I don't believe any part of the project has a hard requirement for Typescript. We just tend to show our examples using it for two reasons:
Take Conic Gradients for example:
https://skeleton.brainandbonesllc.com/components/conic-gradients
With a Typescript type added: