* avoid circularity in getTypeOfVariableOrParameterOrProperty Modify getTypeOfVariableOrParameterOrProperty to get the type of the variable declaration before widening it. This essentially avoids some circularities by (1) setting the type of the variable declaration to the unwidened type (2) updating the type of the variable declaration to the widened one. You will still get a circular noImplicitAny in (1), for expressions that actually are circular, but not in (2), for the containers of things that are not themselves circular. * Stop checking js init object literals via checkObjectLiteral * checkBinaryExpression: new code for special assignments * Chained lookup for js initializer type * Check for JS-specific types only once Also make sure to respect the type annotation if there is one. * Accept API changes
19 lines
366 B
TypeScript
19 lines
366 B
TypeScript
// @noEmit: true
|
|
// @noImplicitAny: true
|
|
// @checkJs: true
|
|
// @allowJs: true
|
|
// @Filename: bug24730.js
|
|
var UI = {}
|
|
UI.TreeElement = class {
|
|
constructor() {
|
|
this.treeOutline = 12
|
|
}
|
|
};
|
|
UI.context = new UI.TreeElement()
|
|
|
|
class C extends UI.TreeElement {
|
|
onpopulate() {
|
|
this.doesNotExist
|
|
this.treeOutline.doesntExistEither()
|
|
}
|
|
};
|