|
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.
types/src/class/ClassGenerator.ts
Lines 1123 to 1130 in 359fedb
Previously, this would warn when
customDefinitions.d.tsdefined a differentextends OtherClassthan 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 asextends Instance, but was changed to extendPVInstancein a recent API change. The generator did reorderCamera's definition inNone.d.ts, but did not change its parent class, and did not emit a warning.