vaadin / vaadin-connect

A Vaadin Labs experiment with a secure stateless communication framework
https://vaadin.com/labs/vaadin-connect
Apache License 2.0
18 stars 5 forks source link

Generator plugin should support annotations on generic types #388

Open SomeoneToIgnore opened 5 years ago

SomeoneToIgnore commented 5 years ago

Given a service method defined as

@NotNull
public List<@NotNull Product> list() {
    return repository.findAll();
}

I would expect the following TS definition generated by the plugin:

export function list(): Promise<Array<Product>> {
  return client.call('ProductEndpoint', 'list');
}

Instead I get

export function list(): Promise<Array<Product | null>> {
  return client.call('ProductEndpoint', 'list');
}
eriklumme commented 5 years ago

+1 for this