TypeScript/tests/cases/conformance/salsa
Nathan Shively-Sanders c184184713
Add getEffectiveConstructSignatures (#27561)
* Add helpers that understand constructor functions

* getEffectiveConstructSignatures gets construct signatures from type, and
  call signatures from constructor functions if there are no construct
  signatures.
* getEffectiveConstructSignatureReturnType gets the "JS Class type" for
  constructor functions, and the return type of signatures for all other
  declarations.

This is a first step toward making constructor functions have construct
signatures instead of call signatures, which will also contribute to
fixing instantiation of generic constructor functions, which is basically
broken right now.

Note that the baselines *improve* but, because of the previously
mentioned generic problem, are still not correct. Construct signatures
for constructor functions and generic constructor functions turns out to
be an intertwined problem.

* Correct correct originalBaseType

And, for now, return anyType for generic constructor functions used as
base types. Don't give an incorrect error based on the function's return
type, which is usually void.

* Add error examples to tests

* Add construct signatures instead of getEffective* functions

* Fix typo in baseline

* Remove pesky newline

I thought I got rid of it!

* Test of constructor tag on object literal method

It doesn't work, and shouldn't in the future, because it's a runtime
error.
2018-10-15 12:47:57 -07:00
..
annotatedThisPropertyInitializerDoesntNarrow.ts For a this-property assignment with an empty object initializer, use type annotation if present (#26428) 2018-08-15 14:53:30 -07:00
chainedPrototypeAssignment.ts Improve binding and jsdoc of chained special js assignments (#23038) 2018-04-02 09:47:01 -07:00
checkSpecialPropertyAssignments.ts Fix duplicate errors in js special assignments (#24508) 2018-06-26 12:40:58 -07:00
classCanExtendConstructorFunction.ts Add getEffectiveConstructSignatures (#27561) 2018-10-15 12:47:57 -07:00
conflictingCommonJSES2015Exports.ts In JS, fix crash with in a file with conflicting ES2015/commonjs exports (#24960) 2018-06-14 11:18:23 -07:00
constructorFunctionMergeWithClass.ts Fix class/constructor-function merge (#27366) 2018-10-08 12:56:19 -07:00
constructorFunctions.ts Add getEffectiveConstructSignatures (#27561) 2018-10-15 12:47:57 -07:00
constructorFunctions2.ts
constructorFunctions3.ts Print js-constructor function type names (#23089) 2018-04-04 15:43:41 -07:00
constructorFunctionsStrict.ts
contextualTypedSpecialAssignment.ts Check module.exports (#25732) 2018-07-20 10:59:26 -07:00
exportDefaultInJsFile01.ts
exportDefaultInJsFile02.ts
exportNestedNamespaces.ts
exportNestedNamespaces2.ts
exportPropertyAssignmentNameResolution.ts Fix exported type resolution in commonjs (#24495) 2018-05-30 14:12:38 -07:00
globalMergeWithCommonJSAssignmentDeclaration.ts Fix cross-file merge of assignment decl valueDeclaration (#26918) 2018-09-16 07:46:03 -07:00
inferingFromAny.ts
inferringClassMembersFromAssignments.ts In JS, this assignments in constructors are preferred and nullable initializers become any (#22882) 2018-03-26 13:42:34 -07:00
inferringClassMembersFromAssignments2.ts
inferringClassMembersFromAssignments3.ts Check base type for special property declarations (#23671) 2018-04-26 08:14:22 -07:00
inferringClassMembersFromAssignments4.ts Check base type for special property declarations (#23671) 2018-04-26 08:14:22 -07:00
inferringClassMembersFromAssignments5.ts Check base type for special property declarations (#23671) 2018-04-26 08:14:22 -07:00
inferringClassStaticMembersFromAssignments.ts Better JS container binding (#24367) 2018-05-31 11:41:26 -07:00
jsContainerMergeJsContainer.ts Fix stack overflow in merge symbol (#24134) 2018-05-15 12:49:54 -07:00
jsContainerMergeTsDeclaration.ts Better JS container binding (#24367) 2018-05-31 11:41:26 -07:00
jsContainerMergeTsDeclaration2.ts Better JS container binding (#24367) 2018-05-31 11:41:26 -07:00
jsContainerMergeTsDeclaration3.ts Better JS container binding (#24367) 2018-05-31 11:41:26 -07:00
jsObjectsMarkedAsOpenEnded.ts
malformedTags.ts
methodsReturningThis.ts
moduleExportAlias.ts
moduleExportAlias2.ts Allow exports assignments (#23319) 2018-04-11 06:49:58 -07:00
moduleExportAlias3.ts Fix duplicate identifier error with module.exports (#24466) 2018-05-29 14:29:48 -07:00
moduleExportAlias4.ts Better fix for bogus duplicate identifier in module exports (#24491) 2018-05-30 09:59:14 -07:00
moduleExportAlias5.ts Add Variable to HasExports (#24871) 2018-06-11 14:45:27 -07:00
moduleExportAliasUnknown.ts Fix commonjs export= merging (#27368) (#27371) 2018-09-26 12:40:30 -07:00
moduleExportAssignment.ts Check module.exports (#25732) 2018-07-20 10:59:26 -07:00
moduleExportAssignment2.ts Check module.exports (#25732) 2018-07-20 10:59:26 -07:00
moduleExportAssignment3.ts Check module.exports (#25732) 2018-07-20 10:59:26 -07:00
moduleExportAssignment4.ts Check module.exports (#25732) 2018-07-20 10:59:26 -07:00
moduleExportAssignment5.ts Check module.exports (#25732) 2018-07-20 10:59:26 -07:00
moduleExportAssignment6.ts Only bind module.exports if no local definition exists (#25869) 2018-07-30 12:27:59 -07:00
moduleExportNestedNamespaces.ts
moduleExportPropertyAssignmentDefault.ts Check module.exports (#25732) 2018-07-20 10:59:26 -07:00
moduleExportWithExportPropertyAssignment.ts Allow both module.exports= and module.exports property assignments (#23228) 2018-04-06 13:04:39 -07:00
moduleExportWithExportPropertyAssignment2.ts Allow both module.exports= and module.exports property assignments (#23228) 2018-04-06 13:04:39 -07:00
moduleExportWithExportPropertyAssignment3.ts Allow both module.exports= and module.exports property assignments (#23228) 2018-04-06 13:04:39 -07:00
moduleExportWithExportPropertyAssignment4.ts Allow both module.exports= and module.exports property assignments (#23228) 2018-04-06 13:04:39 -07:00
multipleDeclarations.ts
nestedPrototypeAssignment.ts Better JS container binding (#24367) 2018-05-31 11:41:26 -07:00
propertyAssignmentOnImportedSymbol.ts Fix property assignment on aliases (#24659) 2018-06-04 13:34:23 -07:00
topLevelThisAssignment.ts Handle toplevel this-assignment (#22913) 2018-03-27 12:24:37 -07:00
typeFromContextualThisType.ts In JS, fix contextual type of this assignments (#26743) 2018-08-29 15:06:38 -07:00
typeFromJSConstructor.ts In JS, this assignments in constructors are preferred and nullable initializers become any (#22882) 2018-03-26 13:42:34 -07:00
typeFromJSInitializer.ts In JS, this assignments in constructors are preferred and nullable initializers become any (#22882) 2018-03-26 13:42:34 -07:00
typeFromParamTagForFunction.ts
typeFromPropertyAssignment.ts
typeFromPropertyAssignment2.ts
typeFromPropertyAssignment3.ts
typeFromPropertyAssignment4.ts
typeFromPropertyAssignment5.ts
typeFromPropertyAssignment6.ts
typeFromPropertyAssignment7.ts
typeFromPropertyAssignment8.ts
typeFromPropertyAssignment9.ts
typeFromPropertyAssignment10.ts
typeFromPropertyAssignment11.ts
typeFromPropertyAssignment12.ts
typeFromPropertyAssignment13.ts
typeFromPropertyAssignment14.ts
typeFromPropertyAssignment15.ts
typeFromPropertyAssignment16.ts
typeFromPropertyAssignment17.ts
typeFromPropertyAssignment18.ts Better handling of circular JS containers in getTypeOfVariableOrParameterOrProperty (#24732) 2018-06-12 09:42:26 -07:00
typeFromPropertyAssignment19.ts
typeFromPropertyAssignment20.ts
typeFromPropertyAssignment21.ts
typeFromPropertyAssignment22.ts In JS, this assignments in constructors are preferred and nullable initializers become any (#22882) 2018-03-26 13:42:34 -07:00
typeFromPropertyAssignment23.ts Prototype assignments count as method-like (#23137) 2018-04-04 11:03:31 -07:00
typeFromPropertyAssignment24.ts Improve valueDeclaration for js module merges (#24707) 2018-06-06 11:11:15 -07:00
typeFromPropertyAssignment25.ts Fix circularity error when extending class in same JSContainer (#24710) 2018-06-06 09:13:38 -07:00
typeFromPropertyAssignment26.ts Better handling of circular JS containers in getTypeOfVariableOrParameterOrProperty (#24732) 2018-06-12 09:42:26 -07:00
typeFromPropertyAssignment27.ts Support prototype assignment with a function declaration (#25300) 2018-07-05 09:04:28 -07:00
typeFromPropertyAssignment28.ts Support prototype assignment with a function declaration (#25300) 2018-07-05 09:04:28 -07:00
typeFromPropertyAssignment29.ts Declaration emit includes function properties (#26499) 2018-08-27 10:29:53 -07:00
typeFromPropertyAssignment30.ts Don't create expando object literals in TS (#26525) 2018-08-23 08:21:28 -07:00
typeFromPropertyAssignment31.ts Fix namespace expando merge (#26690) 2018-08-30 13:18:50 -07:00
typeFromPropertyAssignment32.ts Fix namespace expando merge (#26690) 2018-08-30 13:18:50 -07:00
typeFromPropertyAssignment33.ts Fix namespace expando merge (#26690) 2018-08-30 13:18:50 -07:00
typeFromPropertyAssignment34.ts Bind non-expando property assignments at top-level (#26908) 2018-09-05 10:53:43 -07:00
typeFromPropertyAssignment35.ts Fix cross-file merge of assignment decl valueDeclaration (#26918) 2018-09-16 07:46:03 -07:00
typeFromPropertyAssignment36.ts Definite assignment checking for expando properties (#27128) 2018-09-17 12:56:39 -07:00
typeFromPropertyAssignment37.ts Only report expando use-before-def for identical control flow containers (#27199) 2018-09-18 15:28:16 -07:00
typeFromPropertyAssignmentOutOfOrder.ts Improve valueDeclaration for js module merges (#24707) 2018-06-06 11:11:15 -07:00
typeFromPropertyAssignmentWithExport.ts
typeFromPrototypeAssignment.ts Fix this-type in prototype-assigned object literals (#26925) 2018-09-12 16:21:17 -07:00
typeFromPrototypeAssignment2.ts Fix non-toplevel prototype assignment (#27096) 2018-09-17 13:07:05 -07:00
typeLookupInIIFE.ts Fix crash in type resolution in JS IIFEs (#23171) 2018-04-05 09:57:35 -07:00
varRequireFromJavascript.ts
varRequireFromTypescript.ts