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

accessing types from semiotic v2 #527

Open
cainlevy opened this issue Jul 16, 2020 · 2 comments
Open

accessing types from semiotic v2 #527

cainlevy opened this issue Jul 16, 2020 · 2 comments
Labels
chores 🧹 Infrastructure and updates

Comments

@cainlevy
Copy link

When using semiotic@2.0.0-rc5, I am able to access the types only when I import components by name from the dist/ directory. This is a tricky thing to discover because the live code examples use lib/.

Types Included

import XYFrame from 'semiotic/dist/XYFrame'

Types Not Included

import XYFrame from 'semiotic/lib/XYFrame';
import {XYFrame} from 'semiotic';

Thoughts

Is importing components by pathname the right pattern? It would be helpful to clarify dist vs lib, especially in the code examples on https://semiotic.nteract.io/.

Should I also be able to import components from the package index? Might need a "types" entry in package.json.

@emeeks
Copy link
Member

emeeks commented Jul 30, 2020

These are good points. I'll dig into it and see what I can do to clean this up. I've been working with typescript for a while but I'm still rather new to publishing types. Happy to review a PR if you want to dive into it.

@willingc willingc added the chores 🧹 Infrastructure and updates label Dec 16, 2021
@alexeyraspopov
Copy link
Member

alexeyraspopov commented Jan 4, 2022

I believe this is now fixed by #594 and available in 2.0.0-rc.19.

Warning: only named imports are now available. Use import { XYFrame } from "semiotic" over import XYFrame from 'semiotic/dist/XYFrame'

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

No branches or pull requests

4 participants