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

Typescript types? #49

Closed
abalmos opened this issue Nov 16, 2021 · 9 comments
Closed

Typescript types? #49

abalmos opened this issue Nov 16, 2021 · 9 comments
Labels
help wanted Extra attention is needed in-progress

Comments

@abalmos
Copy link

abalmos commented Nov 16, 2021

Sorry if this is the wrong place to ask, but don't see any other community forum/chat.

I just wanted to verify that I am not missing user contributed Typescript types for Layer Cake that you might be aware of?

@mhkeller
Copy link
Owner

There aren’t but I should add them. Do you have an example repo that implements them?

@abalmos
Copy link
Author

abalmos commented Nov 17, 2021

I don't yet, but I have considered starting a set. Unfortunately, at the moment I don't have the free time to spare. Maybe soon -- thanks for confirming.

@abalmos
Copy link
Author

abalmos commented Nov 17, 2021

Are you open to converting the code base to TS? Looking at the source, I'm wondering if that isn't too much more work then creating a .d.ts file.

@mhkeller
Copy link
Owner

Yeah I think it's a good idea – I just want to see how other svelte projects have implemented them / best practices etc.

@mhkeller
Copy link
Owner

I'm tinkering with the best way to do this on the kit branch. I'm finding a lack of great docs and examples, though so if anyone has any ideas on best practices, please let me know.

@mhkeller mhkeller added help wanted Extra attention is needed in-progress labels Dec 10, 2021
@pierreminik
Copy link

I add my interfaces and types in the src/global.s.ts (without export) and then I don’t need to import them anywhere. I don’t know if this is best practise but it seems to work okay.

@mhkeller
Copy link
Owner

The kit branch now has these if anyone wants to test: https://github.com/mhkeller/layercake/tree/kit

@mhkeller
Copy link
Owner

I'm going to close these in favor of this issue: #56 any testing would still be appreciated!

@abalmos
Copy link
Author

abalmos commented Dec 15, 2021

@mhkeller Thanks for looking at this. I had to walk away from that project for a little while but I hope to get back to it by latest early next week. I will try out #56 and give feed/help as needed when I do so if the PR is still open.

In the meantime I had gone the same route as @pierreminik and built my own types.d.ts but your approach in #56 is much better long term.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed in-progress
Projects
None yet
Development

No branches or pull requests

3 participants