Skip to content

Specifying npm version breaks types #378

Open

Description

@tennox

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 "canvas-confetti@1.9.0";
import { create } from "https://esm.run/canvas-confetti@1.9.0";

Example notebook

Activity

  1. changed the title [-]Specify npm version breaks types[/-] [+]Specifying npm version breaks types[/+] on Dec 18, 2023
  2. tennox commented on Dec 18, 2023

    @tennox
    Author

    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

  3. YousefED commented on Jan 8, 2024

    @YousefED
    Collaborator

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions