Skip to content

Changed parent class warning has disappeared, and is not fixed automatically #1367

@Dionysusnu

Description

@Dionysusnu

const superClassName = this.generateClassName(rbxClass.Superclass);
extendsStr = `extends ${superClassName} `;
if (tsImplInterface) {
// getExpression separates a possible <TypeGenerics> part
const originalExtends = tsImplInterface.getExtends()[0].getExpression().getText();
if (originalExtends !== superClassName) {
fatal(rbxClass.Name, "had its parent class changed from", originalExtends, "to", superClassName);
}

Previously, this would warn when customDefinitions.d.ts defined a different extends OtherClass than the API dump. This warning is not present in the rewrite, and it sticks to the customDefinitions parent class.

This can currently be seen with Camera, which is customDefined as extends Instance, but was changed to extend PVInstance in a recent API change. The generator did reorder Camera's definition in None.d.ts, but did not change its parent class, and did not emit a warning.

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