Comments (4)
I created a message regarding this issue on the Svelte Discord. I figured I'd shared here as well, just in case:
https://discord.com/channels/457912077277855764/1004975444459790356
Long story short, I need to know the best means to export custom Typescript interfaces as part of the package. Trying to do this in index.js, similar to a component, does not work. I figure there's a simple syntax to do so that I'm missing.
End goal is for end users to be able to import the type like this:
import type { DialogAlert } from '@brainandbones/skeleton';
Rather than having to point to the the full source like so:
import type { DialogAlert } from '@brainandbones/skeleton/Notifications/Stores';
I'll research and test a bit more soon, however, I welcome any support in the meantime!
from skeleton.
The types have to be exported in a .ts file, doing this in src/lib/index.d.ts
will block the autogenerated component exports that are created by svelte-kit package
, so this is a quick little workaround to get custom types added to the root @brainandbones/skeleton
namespace in the exported package
from skeleton.
This is great, looks like it'll do exactly what is needed, but I'll need to request a couple other small changes. I'll reject the PR and post comments there to make it obvious. Check there shortly.
from skeleton.
We appear to have a fix for this. See my latest comment here: #73
Long story short, we just need to rename index.js
-> index.ts
and then we can drop our Type exports right in! This should come alongside updates to the Dialog/Toast docs import snippets of course!
from skeleton.
Related Issues (20)
- Carousel seems broken on doc page HOT 1
- Refactor React components to fall more inline with existing React libraries HOT 4
- RFC: Remove return types from React components
- A little bit of white peeking out on the progress bars (styling issue) HOT 4
- InputChips does not have restProps HOT 2
- Table of Contents: support setting scrollTarget, scrollOffset HOT 1
- AppRailTile on:click not working (v2.10.1) HOT 5
- Revert missing on:click event for App Rail Anchor Tile component
- NEXT: component consistency pass
- Missing import of popup HOT 3
- Carousels example HOT 2
- v3 Component API Revisions HOT 1
- NEXT: Revisit Tab Component and API HOT 1
- NEXT: Accordion missing a11y HOT 1
- NEXT: Dependency updates
- NEXT: Introduce the skeleton-a11y package
- Hover state on buttons in mobile stays after click in incoherent ways HOT 5
- AppRail HTML markup is invalid and not accessible HOT 1
- ListBoxItem HTML markup is invalid and not accessible HOT 2
- Disabled State for AppRailTiles
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from skeleton.