TypeScript/tests/cases/conformance
James Keane a1089893bd Fixes #26128 - signature comp for jsdoc @class. (#26160)
* Fixes #26128 - signature comp for  jsdoc @class.

Another issue caused by js functions tagged with jsdoc
`@constructor` not having construct signatures.

A jsdoc function type that constructs a type (`function(new: Ex)`),
has a construct signature and return value inferred as the
constructed type where as a jsdoc `@constructor` has no construct
signatures, and it's call signature has a void return type
(or undefined).

i.e:
```javascript
/** @constructor **/ function E() {};

// typeof E -> call signature: () => void

/** @param {function(new: E)} d */ function c(d) {}

// typeof d -> construct: () => E
```

--

This commit fixes this (in an inelegant way) by considering `@class` function signatures as construct signatures and synthesizing it's return value _only for signature comparison_.

There might be a slight performance hit, since the synthesized return value is not cached; but changing the `@class` function's return type in `getReturnTypeOfSignature` causes other issues.

* Update jsdoc function test to fix mistake.
2018-08-14 13:35:51 -07:00
..
ambient
async
classes
constEnums
controlFlow
declarationEmit
decorators
dynamicImport
emitter
enums
es6 Destructuring declaration prefers type annotation type (#25282) 2018-06-28 10:41:38 -07:00
es7
es2017
es2018
es2019/importMeta
expressions Have getAssignmentReducedType use the comparable relation instead of 2018-08-01 23:26:17 -04:00
externalModules
functions
interfaces
internalModules
jsdoc Fixes #26128 - signature comp for jsdoc @class. (#26160) 2018-08-14 13:35:51 -07:00
jsx Support LibraryManagedAttributes<TComponent, TAttributes> JSX namespace type (#24422) 2018-06-29 18:45:29 -07:00
moduleResolution "Could not find a declaration file for module" error needs to use the 2018-08-01 14:13:38 -04:00
parser
references
salsa Fixes #26122 - erroneous "TS2350" for js constructors called with incorrect parameters (#26124) 2018-08-01 13:40:55 -07:00
scanner
statements add grammar check for labeled declaration (#25317) 2018-07-18 15:37:27 -06:00
Symbols
types Don't include class getter in spread type (#26287) 2018-08-09 15:34:29 -07:00
typings
fixSignatureCaching.ts