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

Specifying npm version breaks types #378

Open
tennox opened this issue Dec 18, 2023 · 2 comments
Open

Specifying npm version breaks types #378

tennox opened this issue Dec 18, 2023 · 2 comments

Comments

@tennox
Copy link

tennox commented Dec 18, 2023

Normal import - working types:
Screenshot from 2023-12-18 17-54-52

I was happy to see selecting a specific npm package version works, but it shows an error & doesn't load types:
Screenshot from 2023-12-18 17-55-55

Tried different variations:

import { create } from "[email protected]";
import { create } from "https://esm.run/[email protected]";

Example notebook

@tennox tennox changed the title Specify npm version breaks types Specifying npm version breaks types Dec 18, 2023
@tennox
Copy link
Author

tennox commented Dec 18, 2023

While we're at it, I'm thinking if there could be a nice way to globally import things, because currently you have to either:

  1. import in every cell
  2. import in top cell, but use $. to access imports
  3. import in top cell, and const { helper } = $

While 1. is too verbose, it's the only option to have code in notebooks copyable into a different IDE

@YousefED
Copy link
Collaborator

YousefED commented Jan 8, 2024

Agree it would be great to add support for this!

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