Skip to content

Use inheritance for static interface #34

@mhfrantz

Description

@mhfrantz

Currently, there is no inheritance relationship between the generated interfaces representing the Java static API. It would be better to exploit that, in part to reduce the redundancy of inherited static API.

class Base {
    public static final String FOO = "foo";
}

class Derived extends Base {
    public static final String BAR = "bar";
}

This should result in something like this TS:

export module Base {
  export interface Static {
    FOO: string;
  }
}

export module Derived {
  export interface Static extends Base.Static {
    BAR: string;
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions