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.

Interface support

See original GitHub issue

It would be good to support interfaces. This would mean that the person would have to use this library on the typescript before compiling (shouldn’t be done on the original source files obviously).

So maybe this:

interface MyInterface {
    prop: string;
}

nameof<MyInterface>();

Compiles to:

"MyInterface";

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dsherretcommented, Sep 2, 2016

@styfle that’s a very good point. I’ve thought about it a lot the past few days. Previously I was using the ts compiler so I could figure that out if the user were to pass in their compiler options to this library as well; however, I decided to drop using the ts compiler for performance reasons and to better support streams (coming this weekend probably).

So yes, you’re right that there won’t be a safety check when running this on typescript code; however, I would think that the vast majority of people will be using IDEs and the IDE will show them the compiler error when they do nameof(undefinedvariablename). It’s not perfect, but they will get the error from their IDE. It’s still a lot better than just using strings.

0reactions
dsherretcommented, Dec 23, 2018

@Brandejs try using the new webpack instructions and don’t use tsnameof-loader: https://github.com/dsherret/ts-nameof/blob/master/setup/webpack.md

Also, highly recommend opening new issues in the issue tracker for new problems. It’s very easy for comments on resolved issues to get lost.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Contact Interface – We're Here to Help!
Contact Interface – We're Here to Help! · 1-800-727-1668 · 800-279-9090 · 866-593-3485 · Pay bills online · 888-947-8110.
Read more >
Support Interface - an overview | ScienceDirect Topics
Support Interface. The SWu interface supports procedures for establishment or disconnection of an end-to-end tunnel between the UE and the ePDG.
Read more >
What Support for an Interface Means - Win32 apps
To that end, the following table lists the interfaces that an ActiveX Control might support, and what it means to support that interface....
Read more >
Contact Us | Commercial Carpet Tile & Resilient Flooring
US Headquarters. Interface 1280 West Peachtree St NW Atlanta, GA 30309. United States ; General Inquiries. 800-336-0225 ; Customer Service. 800-634-6032 ...
Read more >
Cura Support Interface : r/3Dprinting - Reddit
There's a specific setting called "Enable Support Interface." It builds a flat roof (and/or floor) on support structures that better conforms 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