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

Differentiate between interface definition and class definition #423

Closed
dsifford opened this issue Mar 1, 2017 · 1 comment
Closed

Differentiate between interface definition and class definition #423

dsifford opened this issue Mar 1, 2017 · 1 comment

Comments

@dsifford
Copy link

dsifford commented Mar 1, 2017

TS and JS Grammar Extension version: 0.0.18 / latest

There is currently no way to differentiate between a simple interface definition and an actual class implementation (see image below).

image

In a perfect world, there'd be some way to differentiate between the TransportLayer interface definition and the WPGraphQL class. Currently both of these have identical scopes.

Thanks for the consideration!

@dsifford
Copy link
Author

dsifford commented Mar 1, 2017

If the suggestion above doesn't really work, an alternative that would be nice also in my case would be to be able to differentiate between interface/class/type definitions and implementations.

So, for example...

interface Foo {
    bar: string;
}

type T = Foo; // line 5
interface Bar {
    foo: Foo;  // line 7
}

Where Foo on line 1 could be scoped differently than when it's used on lines 5 and 7.

The use-case here being to create a syntax theme that allows for quick identification of types being defined and types being consumed.

(I will admit, this is super nit-picky! I do appreciate the consideration though nevertheless)

Thanks again for all your hard work 😄

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

1 participant