TypeScript/tests/cases/compiler/functionExpressionNames.ts
Nathan Shively-Sanders dca3a94f88
Print js-constructor function type names (#23089)
* Print js-constructor function type names

Instead of printing them as a type literal, which is scary.

* Use assigned name for functions and classes

That otherwise have no name. This helps quick info for javascript a
*lot*. Typescript mainly benefits when printing the type of class
expressions.

* Improve names of functions in binding elements

Also fix some fourslash baselines
2018-04-04 15:43:41 -07:00

34 lines
486 B
TypeScript

// @allowJs: true
// @noEmit: true
// @checkJs: true
// @Filename: b.js
exports.E = function() {
this.e = 'exported'
}
var e = new exports.E();
var o = {
C: function () {
this.c = 'nested object'
}
}
var og = new o.C();
var V = function () {
this.v = 'simple'
}
var v = new V();
var A;
A = function () {
this.a = 'assignment'
}
var a = new A();
const {
B = function() {
this.b = 'binding pattern'
}
} = { B: undefined };
var b = new B();