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.

Export Text as Txt to help with automatic imports

See original GitHub issue

🚀 Feature request

Export Text as Txt to aid with automatic imports

🧱 Problem Statement / Justification

When developing in Chakra with TypeScript, most components automatically import very well. Text is the obvious exception, because it is a browser global. This also breaks the TypeScript server’s attempts to import all components automatically, as well as various refactoring plugins in VSCode (and I’m sure others).

✅ Proposed solution or API

export const Txt = Text - just this. Keep the Text export but mark it as deprecated.

↩️ Alternatives

Somehow getting Chakra to override the browser global types such that TS doesn’t think window.Text is a thing any more.

📝 Additional Information

None, sorry. I bet I’m not the only one with this issue though!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:8
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jeremiah-shorecommented, Dec 11, 2022

Adding my voice to this as well. Although it’s very easy to alias the export ourselves in all of the projects we work on, that repetition feels like a code smell. If it’s no major lift, it would be great to have the exported aliases taken care of without the extra steps. 😄

1reaction
lucasrabieccommented, Nov 14, 2022

I also bump this proposal. It is a little bit annoying to import Text and Image over and over manually. It’s just a little thing but exporting Text as Txt and Image as Img would be helpful.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Import or export text (.txt or .csv) files - Microsoft Support
Export data to a text file by saving it · Go to File > Save As. · Click Browse. · In the Save...
Read more >
Importing and exporting text in Illustrator - Adobe Support
Choose File > Open. Select the text file you want to open and select Open.
Read more >
Automatically import txt data and save. | MrExcel Message Board
Hi Nimrod. I am trying to open text files automatically. Then modify the data and have it save as a text file in...
Read more >
Exporting and Importing String Entries
1. In the View List under User Interface, click String Editor. · 2. Click the Import Strings button. · 3. Select the text...
Read more >
Importing and exporting text-delimited data - Stata
txt, etc.) Preview lets you see how the data will look in Stata even before you import them, even from data on the...
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