-
Notifications
You must be signed in to change notification settings - Fork 237
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
Generic type parameters not resolved properly #380
Comments
|
@olegshtch I tried #389 with mentioned example, here is the generated output: export class Entity1View implements Entity1IdView {
id: T; // needs to be resolved
name: string;
}
export interface Entity1IdView extends IdView<string> {
}
export interface IdView<T extends Serializable> { // added generic bound
id: T;
}
export interface Serializable {
} I think it is needed to resolve generic variable This would be also useful for #219. |
It's strange but after rebase #389 on top interface Entity1View extends Entity1IdView {
name: string;
}
interface Entity1IdView extends IdView<string> {
}
interface IdView<T extends string> {
id: T;
} from: public interface IdView<T extends String> {
T getId();
}
public interface Entity1IdView extends IdView<String> {
}
public abstract class Entity1View implements Entity1IdView {
private String name;
public String getName() { return name; }
} It looks correct. |
Testcase from vojtechhabarta#380
Looks like somehow it should generate |
Testcase from vojtechhabarta#380
Fix released in version 2.17.558. |
Given to following class hierarchy:
Yields the following typescript definitions:
Apparently, the type parameter
T
is not resolved correctly for the declaration of theid
field inEntity1View
.The text was updated successfully, but these errors were encountered: