question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CodeFix to import entire module into single variable

See original GitHub issue

Not sure if this would be possible but it would be nice if one could import entire module into single variable.

For example CodeFix on bluebird or on mapSeries

image

would offer import * as bluebird from 'bluebird'

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
DanielRosenwassercommented, Nov 12, 2018

We now have a refactoring to go between the two:

namespacetonamedimports

Not quite what you want but it’s close.

1reaction
mhegazycommented, Jan 12, 2018

This should not be needed with the auto-import feature. animation

Read more comments on GitHub >

github_iconTop Results From Across the Web

Import All Named Exports into One Variable - chan.dev
Importing all named exports into a single variable is great feature for application code. Consider these UI modules that have a similar export ......
Read more >
Use 'import module' or 'from module import'? - Stack Overflow
Imports foo , and creates references to all the members listed ( bar ). Does not set the variable foo . E.g. bar...
Read more >
https://www.rose-hulman.edu/class/csse/csse120/css...
Others are defined in modules (aka libraries) that must be # IMPORTED into ... the result 1.234567) but USING ONLY *ONE* VARIABLE #...
Read more >
Python import: Advanced Techniques and Tips
In Python, you use the import keyword to make code in one module ... In the second line, you access the pi variable...
Read more >
CS2110 Lecture 4 Feb. 1, 2021
Functions only (except “import math” also okay) ... Then modify code/fix errors in ... Only a single variable name can appear on to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found