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

Support generics and/or overrides. #9

Open
jmoseley opened this issue Jun 8, 2017 · 0 comments
Open

Support generics and/or overrides. #9

jmoseley opened this issue Jun 8, 2017 · 0 comments

Comments

@jmoseley
Copy link

jmoseley commented Jun 8, 2017

Currently the following code will error with Error: Don't know how to handle AnyKeyword nodes:

// Foo.ts
export interface Foo {
  prop:any;
}

// schema.ts
import Foo from './foo';

export interface Bar extends Foo {
  prop:SomeConcreteType;
}

The expectation is that the GQL would contain the type:

type Bar {
  prop: SomeConcreteType
}

Alternatively the source code could be written:

// Foo.ts
export interface Foo<T> {
  prop:T;
}

// schema.ts
import Foo from './Foo';
 
export interface Bar extends Foo<SomeConcreteType>;

And that would result in the same output.

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