139 lines
2.6 KiB
Text
139 lines
2.6 KiB
Text
=== tests/cases/conformance/salsa/input.js ===
|
|
function C() {
|
|
>C : () => void
|
|
|
|
this.m = null;
|
|
>this.m = null : null
|
|
>this.m : any
|
|
>this : any
|
|
>m : any
|
|
>null : null
|
|
}
|
|
C.prototype.m = function() {
|
|
>C.prototype.m = function() { this.nothing();} : () => void
|
|
>C.prototype.m : any
|
|
>C.prototype : any
|
|
>C : () => void
|
|
>prototype : any
|
|
>m : any
|
|
>function() { this.nothing();} : () => void
|
|
|
|
this.nothing();
|
|
>this.nothing() : any
|
|
>this.nothing : any
|
|
>this : { m: () => void; }
|
|
>nothing : any
|
|
}
|
|
class X {
|
|
>X : X
|
|
|
|
constructor() {
|
|
this.m = this.m.bind(this);
|
|
>this.m = this.m.bind(this) : any
|
|
>this.m : () => void
|
|
>this : this
|
|
>m : () => void
|
|
>this.m.bind(this) : any
|
|
>this.m.bind : (this: Function, thisArg: any, ...argArray: any[]) => any
|
|
>this.m : () => void
|
|
>this : this
|
|
>m : () => void
|
|
>bind : (this: Function, thisArg: any, ...argArray: any[]) => any
|
|
>this : this
|
|
|
|
this.mistake = 'frankly, complete nonsense';
|
|
>this.mistake = 'frankly, complete nonsense' : "frankly, complete nonsense"
|
|
>this.mistake : any
|
|
>this : this
|
|
>mistake : any
|
|
>'frankly, complete nonsense' : "frankly, complete nonsense"
|
|
}
|
|
m() {
|
|
>m : () => void
|
|
}
|
|
mistake() {
|
|
>mistake : any
|
|
}
|
|
}
|
|
let x = new X();
|
|
>x : X
|
|
>new X() : X
|
|
>X : typeof X
|
|
|
|
X.prototype.mistake = false;
|
|
>X.prototype.mistake = false : false
|
|
>X.prototype.mistake : any
|
|
>X.prototype : X
|
|
>X : typeof X
|
|
>prototype : X
|
|
>mistake : any
|
|
>false : false
|
|
|
|
x.m();
|
|
>x.m() : void
|
|
>x.m : () => void
|
|
>x : X
|
|
>m : () => void
|
|
|
|
x.mistake;
|
|
>x.mistake : any
|
|
>x : X
|
|
>mistake : any
|
|
|
|
class Y {
|
|
>Y : Y
|
|
|
|
mistake() {
|
|
>mistake : any
|
|
}
|
|
m() {
|
|
>m : () => void
|
|
}
|
|
constructor() {
|
|
this.m = this.m.bind(this);
|
|
>this.m = this.m.bind(this) : any
|
|
>this.m : () => void
|
|
>this : this
|
|
>m : () => void
|
|
>this.m.bind(this) : any
|
|
>this.m.bind : (this: Function, thisArg: any, ...argArray: any[]) => any
|
|
>this.m : () => void
|
|
>this : this
|
|
>m : () => void
|
|
>bind : (this: Function, thisArg: any, ...argArray: any[]) => any
|
|
>this : this
|
|
|
|
this.mistake = 'even more nonsense';
|
|
>this.mistake = 'even more nonsense' : "even more nonsense"
|
|
>this.mistake : any
|
|
>this : this
|
|
>mistake : any
|
|
>'even more nonsense' : "even more nonsense"
|
|
}
|
|
}
|
|
Y.prototype.mistake = true;
|
|
>Y.prototype.mistake = true : true
|
|
>Y.prototype.mistake : any
|
|
>Y.prototype : Y
|
|
>Y : typeof Y
|
|
>prototype : Y
|
|
>mistake : any
|
|
>true : true
|
|
|
|
let y = new Y();
|
|
>y : Y
|
|
>new Y() : Y
|
|
>Y : typeof Y
|
|
|
|
y.m();
|
|
>y.m() : void
|
|
>y.m : () => void
|
|
>y : Y
|
|
>m : () => void
|
|
|
|
y.mistake();
|
|
>y.mistake() : any
|
|
>y.mistake : any
|
|
>y : Y
|
|
>mistake : any
|
|
|