TypeScript/tests/cases/conformance/jsdoc
Wesley Wigham 78a99241d8
Reuse input type nodes when serializing signature parameter and return types (#37444)
* Accept change

* Accept the huge set of ever so slightly changed baselines

* Update return type logic to only reuse nodes if original nodes share scope with current node, like property types, only reuse nodes if symbols referened are acessible, reuse nodes for property signatures, too

* Only reuse nodes when a context is provided (otherwise identifier printback may fail)

* Only track symbol if symbol is found and no error is recorded

* Fix type parameter reuse lookup

* Forbid cjs module.exports references in retained nodes

* Adjust check for cjs export references to not include bad module type in output

* Add symbol to all identifiers we see in existing nodes for quickinfo

* Accept fourslash baseline updates

* Accept slightly updated baseline post-merge

* Do not copy original nodes for error types, replace empty type references with any
2020-04-01 19:50:21 -07:00
..
declarations Reuse input type nodes when serializing signature parameter and return types (#37444) 2020-04-01 19:50:21 -07:00
assertionsAndNonReturningFunctions.ts Add tests 2019-09-20 17:17:39 -07:00
callbackCrossModule.ts Add callback tag, with type parameters (#23947) 2018-05-17 09:28:11 -07:00
callbackTag1.ts Add callback tag, with type parameters (#23947) 2018-05-17 09:28:11 -07:00
callbackTag2.ts Add callback tag, with type parameters (#23947) 2018-05-17 09:28:11 -07:00
callbackTag3.ts Add callback tag, with type parameters (#23947) 2018-05-17 09:28:11 -07:00
callbackTagNamespace.ts Disallow nested object param syntax in callback tag (#24392) 2018-05-24 15:11:33 -07:00
callOfPropertylessConstructorFunction.ts Bind @class in the right place -- bindWorker not bindChildrenWorker (#34575) 2019-10-18 14:13:14 -07:00
checkExportsObjectAssignProperty.ts Add new special assignment kinds for recognizing Object.defineProperty calls (#27208) 2018-10-19 14:31:55 -07:00
checkExportsObjectAssignPrototypeProperty.ts Add new special assignment kinds for recognizing Object.defineProperty calls (#27208) 2018-10-19 14:31:55 -07:00
checkJsdocOnEndOfFile.ts Check EOF token to get errors for JSDoc (#28000) 2018-10-19 16:23:34 -07:00
checkJsdocParamOnVariableDeclaredFunctionExpression.ts More tests for getParameterSymbolFromJSDoc 2017-10-19 16:22:05 -07:00
checkJsdocParamTag1.ts Rename test files to be more consistent and move them into jsdoc folder 2017-05-26 11:20:57 -07:00
checkJsdocReturnTag1.ts Rename test files to be more consistent and move them into jsdoc folder 2017-05-26 11:20:57 -07:00
checkJsdocReturnTag2.ts Rename test files to be more consistent and move them into jsdoc folder 2017-05-26 11:20:57 -07:00
checkJsdocTypedefInParamTag1.ts Merge branch 'master' into master-fix16092 2017-05-30 08:25:53 -07:00
checkJsdocTypedefOnlySourceFile.ts Avoid a crash with @typedef in a script file. (#33847) 2019-10-24 14:04:42 -07:00
checkJsdocTypeTag1.ts Test JSDoc parsing using TS parser 2017-07-13 11:33:12 -07:00
checkJsdocTypeTag2.ts Improve contextual types and return type checking 2017-06-08 16:44:42 -07:00
checkJsdocTypeTag3.ts Test:jsdoc nullable syntax legal in type arguments 2017-08-23 15:00:40 -07:00
checkJsdocTypeTag4.ts Js/check type tags (#24967) 2018-06-14 13:11:52 -07:00
checkJsdocTypeTag5.ts Get return type from @type tag (#25580) 2018-07-12 10:49:41 -07:00
checkJsdocTypeTag6.ts Stricter test that JSDoc @type tag matches function signature (#25615) 2018-07-12 14:02:02 -07:00
checkJsdocTypeTagOnObjectProperty1.ts Add tests and update baselines 2017-06-13 15:24:05 -07:00
checkJsdocTypeTagOnObjectProperty2.ts Add tests and update baselines 2017-06-13 15:24:05 -07:00
checkObjectDefineProperty.ts Add new special assignment kinds for recognizing Object.defineProperty calls (#27208) 2018-10-19 14:31:55 -07:00
checkOtherObjectAssignProperty.ts Add new special assignment kinds for recognizing Object.defineProperty calls (#27208) 2018-10-19 14:31:55 -07:00
constructorTagOnClassConstructor.ts Only functions can be constructor functions (#27369) 2018-10-08 10:14:31 -07:00
constructorTagOnNestedBinaryExpression.ts Get jsdoc host from chained assignment (#36111) 2020-01-10 10:09:39 -08:00
constructorTagOnObjectLiteralMethod.ts Add getEffectiveConstructSignatures (#27561) 2018-10-15 12:47:57 -07:00
enumTag.ts Use nextToken() after parsing a tag name so we can parse type keywords (#26915) 2018-09-13 15:49:06 -07:00
enumTagCircularReference.ts Fix enum tag circular references (#27161) 2018-09-17 16:06:17 -07:00
enumTagImported.ts In JSDoc, resolve import types as values too (#26066) 2018-07-31 11:07:06 -07:00
enumTagOnExports.ts Bind typedef/enum on all assignment decl kinds (#33240) 2019-09-04 13:11:03 -07:00
enumTagOnExports2.ts Bind typedef/enum on all assignment decl kinds (#33240) 2019-09-04 13:11:03 -07:00
enumTagUseBeforeDefCrash.ts Fix crash in use-before-def checking of enum tag (#27350) (#27354) 2018-09-26 09:05:18 -07:00
exportedAliasedEnumTag.ts Fix crash on aliased,exported @enum tag in jsdoc (#36996) 2020-02-24 16:13:18 -08:00
extendsTag1.ts In JS, always check the extends tag of a class before its heritage clause (#25111) 2018-06-20 16:28:30 -07:00
extendsTagEmit.ts Always check extends clause of classes 2019-04-05 16:37:27 -07:00
jsdocAccessibilityTags.ts Add jsdoc support for @public/@private/@protected (#35731) 2019-12-18 12:58:12 -08:00
jsdocAccessibilityTagsDeclarations.ts Add jsdoc support for @public/@private/@protected (#35731) 2019-12-18 12:58:12 -08:00
jsdocAugments_errorInExtendsExpression.ts In JS, always check the extends tag of a class before its heritage clause (#25111) 2018-06-20 16:28:30 -07:00
jsdocAugments_nameMismatch.ts In JS, always check the extends tag of a class before its heritage clause (#25111) 2018-06-20 16:28:30 -07:00
jsdocAugments_noExtends.ts In JS, always check the extends tag of a class before its heritage clause (#25111) 2018-06-20 16:28:30 -07:00
jsdocAugments_notAClass.ts In JS, always check the extends tag of a class before its heritage clause (#25111) 2018-06-20 16:28:30 -07:00
jsdocAugments_qualifiedName.ts In JS, always check the extends tag of a class before its heritage clause (#25111) 2018-06-20 16:28:30 -07:00
jsdocAugments_withTypeParameter.ts In JS, always check the extends tag of a class before its heritage clause (#25111) 2018-06-20 16:28:30 -07:00
jsdocAugmentsMissingType.ts In JS, always check the extends tag of a class before its heritage clause (#25111) 2018-06-20 16:28:30 -07:00
jsdocBindingInUnreachableCode.ts Fix parent points in unreachable code (#27400) (#27406) 2018-09-28 08:31:56 -07:00
jsdocDisallowedInTypescript.ts Parse JSDoc ...T and T= only at top-level JSDoc (#22661) 2018-03-16 16:08:42 -07:00
jsdocFunctionType.ts Fixes #26128 - signature comp for jsdoc @class. (#26160) 2018-08-14 13:35:51 -07:00
jsdocImplements_class.ts Remove bogus @implements errors (#37114) 2020-03-02 09:48:53 -08:00
jsdocImplements_interface.ts Adding support for @implements. (#36292) 2020-02-27 09:27:37 -08:00
jsdocImplements_interface_multiple.ts Adding support for @implements. (#36292) 2020-02-27 09:27:37 -08:00
jsdocImplements_missingType.ts Adding support for @implements. (#36292) 2020-02-27 09:27:37 -08:00
jsdocImplements_properties.ts Adding support for @implements. (#36292) 2020-02-27 09:27:37 -08:00
jsdocImplements_signatures.ts Adding support for @implements. (#36292) 2020-02-27 09:27:37 -08:00
jsdocImportType.ts module.exports = Entity is an alias, just like export = Entity (#23570) 2018-04-23 15:24:31 -07:00
jsdocImportType2.ts module.exports = Entity is an alias, just like export = Entity (#23570) 2018-04-23 15:24:31 -07:00
jsdocImportTypeReferenceToClassAlias.ts getTypeFromJSDocValueReference: handle import types (#34683) 2019-10-23 15:53:38 -07:00
jsdocImportTypeReferenceToCommonjsModule.ts Fix import type resolution in jsdoc, mark 2 (#35057) 2019-11-12 12:44:30 -08:00
jsdocImportTypeReferenceToESModule.ts Fix import type resolution in jsdoc, mark 2 (#35057) 2019-11-12 12:44:30 -08:00
jsdocImportTypeReferenceToStringLiteral.ts Fix getTypeFromJSDocValueReference 2019-11-27 17:53:11 -06:00
jsdocIndexSignature.ts Add a better test for jsdoc index signatures. 2017-10-18 13:06:15 -07:00
jsdocLiteral.ts Support other (new) literal types in jsdoc 2016-08-04 13:01:17 -07:00
jsdocNeverUndefinedNull.ts JSDoc supports null, undefined and never types 2016-08-17 15:49:57 -07:00
jsdocParamTag2.ts JSDoc:positional matching of destructured params (#23307) 2018-04-10 12:48:35 -07:00
jsdocParamTagTypeLiteral.ts checkJs: require JSDoc type argument for Array, Object, and Promise in noImplicitAny (#32829) 2019-08-16 12:41:09 -07:00
jsdocParseBackquotedParamName.ts Two JSdoc parsing fixes (#22705) 2018-03-20 09:23:08 -07:00
jsdocParseDotDotDotInJSDocFunction.ts Improve behaviour of ... inside JSDoc functions (#22809) 2018-03-22 16:17:16 -07:00
jsdocParseErrorsInTypescript.ts Update baselines 2017-07-14 09:34:35 -07:00
jsdocParseHigherOrderFunction.ts Fix parsing of parenthesized JSDoc parameters (#25799) 2018-07-19 12:50:36 -07:00
jsdocParseMatchingBackticks.ts JSDoc:Treat tokens between backticks as comments 2019-06-26 16:04:46 -07:00
jsdocParseParenthesizedJSDocParameter.ts Fix parsing of parenthesized JSDoc parameters (#25799) 2018-07-19 12:50:36 -07:00
jsdocParseStarEquals.ts Two JSdoc parsing fixes (#22705) 2018-03-20 09:23:08 -07:00
jsdocPostfixEqualsAddsOptionality.ts JSDoc ?Type adds optionality to parameters (#22646) 2018-03-16 13:28:24 -07:00
jsdocPrefixPostfixParsing.ts Parse JSDoc ...T and T= only at top-level JSDoc (#22661) 2018-03-16 16:08:42 -07:00
jsdocPrivateName1.ts Private named instance fields (#30829) 2019-12-27 13:07:35 -08:00
jsdocPrivateName2.ts Private named instance fields (#30829) 2019-12-27 13:07:35 -08:00
jsdocPrototypePropertyAccessWithType.ts Don't crash on property access with type (#25170) 2018-06-25 11:25:52 -07:00
jsdocReadonly.ts Readonly support for jsdoc (#35790) 2019-12-20 13:47:20 -08:00
jsdocReadonlyDeclarations.ts Readonly support for jsdoc (#35790) 2019-12-20 13:47:20 -08:00
jsdocReturnTag1.ts Rename test files to be more consistent and move them into jsdoc folder 2017-05-26 11:20:57 -07:00
jsdocTemplateClass.ts Template tag allows specification of constraints (#24600) 2018-06-04 11:42:46 -07:00
jsdocTemplateConstructorFunction.ts Template tag allows specification of constraints (#24600) 2018-06-04 11:42:46 -07:00
jsdocTemplateConstructorFunction2.ts Constructor functions as classes (#32944) 2019-08-19 14:12:53 -07:00
jsdocTemplateTag.ts Prototype-property assignment:fix name resolution crash (#23680) 2018-04-25 13:59:40 -07:00
jsdocTemplateTag2.ts Add callback tag, with type parameters (#23947) 2018-05-17 09:28:11 -07:00
jsdocTemplateTag3.ts Template tag allows specification of constraints (#24600) 2018-06-04 11:42:46 -07:00
jsdocTemplateTag4.ts Fixes for type parameter name resolution in JS (#26830) 2018-09-04 14:47:18 -07:00
jsdocTemplateTag5.ts Fixes for type parameter name resolution in JS (#26830) 2018-09-04 14:47:18 -07:00
jsdocTwoLineTypedef.ts Test: parsing of two-line @typedef jsdoc 2017-09-07 16:22:16 -07:00
jsdocTypeDefAtStartOfFile.ts Test @typedef in @typedef-only JS files 2017-06-13 10:37:04 -07:00
jsdocTypeFromChainedAssignment.ts Improve binding and jsdoc of chained special js assignments (#23038) 2018-04-02 09:47:01 -07:00
jsdocTypeFromChainedAssignment2.ts No error for require, module.exports or exports in Javascript (#23743) 2018-04-30 15:47:59 -07:00
jsdocTypeFromChainedAssignment3.ts Fix factorial jsdoc search:chained assignments (#23115) 2018-04-04 08:57:13 -07:00
jsdocTypeReferenceExports.ts Fix name resolution of exports in JS (#27394) 2018-10-08 13:01:14 -07:00
jsdocTypeReferenceToImport.ts JSDoc type reference understands require with entity name (#34804) 2019-10-29 14:56:33 -07:00
jsdocTypeReferenceToImportOfClassExpression.ts Fix getExpandoSymbol for already-expando symbols (#36457) 2020-01-27 12:32:56 -08:00
jsdocTypeReferenceToImportOfFunctionExpression.ts Fix getExpandoSymbol for already-expando symbols (#36457) 2020-01-27 12:32:56 -08:00
jsdocTypeReferenceToMergedClass.ts Fix expando handling in getTypeReferenceType (#34712) 2019-10-24 13:12:44 -07:00
jsdocTypeReferenceToValue.ts Resolve more jsdoc value references as types (#34515) 2019-10-17 11:21:34 -07:00
jsdocTypeReferenceUseBeforeDef.ts Fix bogus use before def in jsdoc (#25532) 2018-07-10 08:33:19 -07:00
jsdocTypeTag.ts Fix type when annotated with a JSDoc function type (#22692) 2018-03-19 16:00:45 -07:00
jsdocTypeTagCast.ts Use jsdoc casts (#17251) 2017-07-17 23:39:20 -07:00
jsdocTypeTagParameterType.ts Fix type when annotated with a JSDoc function type (#22692) 2018-03-19 16:00:45 -07:00
jsdocTypeTagRequiredParameters.ts Fix type when annotated with a JSDoc function type (#22692) 2018-03-19 16:00:45 -07:00
moduleExportsElementAccessAssignment.ts Allow special element access assignments to create declarations (#33537) 2019-09-30 15:08:44 -05:00
moduleExportsElementAccessAssignment2.ts Detect unbindable exports before setting CommonJS module indicator (#33784) 2019-10-04 11:52:38 -05:00
noAssertForUnparseableTypedefs.ts No assert for nameless typedefs (#26695) 2018-08-27 14:12:14 -07:00
noDuplicateJsdoc1.ts No dupe jsdoc for assignment inside an initializer (#24973) 2018-06-14 15:32:10 -07:00
paramTagBracketsAddOptionalUndefined.ts Brackets and postfix= in @param add undefined (#22514) 2018-03-13 15:56:38 -07:00
paramTagNestedWithoutTopLevelObject.ts Minor refactor in paramTagNestedWithoutTopLevelObject.ts 2019-01-10 14:05:10 -08:00
paramTagNestedWithoutTopLevelObject2.ts Add more tests for qualified name param without top level object error 2019-01-10 15:04:16 -08:00
paramTagNestedWithoutTopLevelObject3.ts Add more tests for qualified name param without top level object error 2019-01-10 15:04:16 -08:00
paramTagNestedWithoutTopLevelObject4.ts Add more tests for qualified name param without top level object error 2019-01-10 15:04:16 -08:00
paramTagOnCallExpression.ts No error on unmatchable @param tags (#22510) 2018-03-14 10:17:54 -07:00
paramTagOnFunctionUsingArguments.ts No error on unmatchable @param tags (#22510) 2018-03-14 10:17:54 -07:00
paramTagTypeResolution.ts Fix jsdoc type resolution [merge to master] (#24204) 2018-05-17 10:46:10 -07:00
paramTagWrapping.ts Skip whitespace or asterisk in JSDoc param type and name (#26067) 2018-08-16 16:16:09 -07:00
returnTagTypeGuard.ts Allow type predicates in JSDoc (#26343) 2018-08-10 15:31:39 -07:00
syntaxErrors.ts Test:ts-ignore works on jsdoc syntax errors 2017-11-17 10:40:16 -08:00
thisTag1.ts Support @this tags (#24927) 2018-06-13 10:11:12 -07:00
tsNoCheckForTypescript.ts Respect //@ts-nocheck in TS files (#33383) 2019-09-27 12:06:05 -07:00
typedefCrossModule.ts Always export typedefs (#23723) 2018-04-30 14:55:26 -07:00
typedefCrossModule2.ts Always export typedefs (#23723) 2018-04-30 14:55:26 -07:00
typedefCrossModule3.ts Always export typedefs (#23723) 2018-04-30 14:55:26 -07:00
typedefCrossModule4.ts Always export typedefs (#23723) 2018-04-30 14:55:26 -07:00
typedefCrossModule5.ts Adds related spans and error grouping for duplicate identifier errors (#25328) 2018-07-02 10:47:52 -07:00
typedefInnerNamepaths.ts Fix crash when binding jsdoc-style inner namepaths (#25106) 2018-06-21 10:01:39 -07:00
typedefMultipleTypeParameters.ts Js/check type tags (#24967) 2018-06-14 13:11:52 -07:00
typedefTagExtraneousProperty.ts @typedef's nested Object syntax disallows type arguments (#36172) 2020-01-29 12:53:00 -08:00
typedefTagNested.ts Parse nested prop and param tags the same way (#25139) 2018-06-21 16:12:55 -07:00
typedefTagTypeResolution.ts Fix jsdoc type resolution [merge to master] (#24204) 2018-05-17 10:46:10 -07:00
typedefTagWrapping.ts Skip asterisks after newline when parsing JSDoc types (#26528) 2018-09-04 15:41:08 -07:00
typeParameterExtendsUnionConstraintDistributed.ts Hoist and distribute type parameter constraints over type parameters … (#33453) 2019-09-23 16:52:03 -07:00
typeTagCircularReferenceOnConstructorFunction.ts Report circular JSDoc type references (#27404) 2018-10-08 08:56:29 -07:00
typeTagModuleExports.ts Better checking of assignment declarations (#28387) 2018-11-15 08:46:11 -08:00
typeTagPrototypeAssignment.ts Better checking of assignment declarations (#28387) 2018-11-15 08:46:11 -08:00
typeTagWithGenericSignature.ts Get [type] parameter types from @type tag (#26694) 2018-08-27 16:52:35 -07:00