mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
feat(27601): include JSDoc comments for destructuring arguments (#46886)
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////interface Options {
|
||||
//// /**
|
||||
//// * A description of foo
|
||||
//// */
|
||||
//// foo: string;
|
||||
////}
|
||||
////
|
||||
////function f({ foo }: Options) {
|
||||
//// foo/*1*/;
|
||||
////}
|
||||
|
||||
verify.baselineQuickInfo();
|
||||
@@ -0,0 +1,20 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////interface Options {
|
||||
//// /**
|
||||
//// * A description of 'a'
|
||||
//// */
|
||||
//// a: {
|
||||
//// /**
|
||||
//// * A description of 'b'
|
||||
//// */
|
||||
//// b: string;
|
||||
//// }
|
||||
////}
|
||||
////
|
||||
////function f({ a, a: { b } }: Options) {
|
||||
//// a/*1*/;
|
||||
//// b/*2*/;
|
||||
////}
|
||||
|
||||
verify.baselineQuickInfo();
|
||||
@@ -0,0 +1,17 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////interface A {
|
||||
//// /**
|
||||
//// * A description of a
|
||||
//// */
|
||||
//// a: number;
|
||||
////}
|
||||
////interface B {
|
||||
//// a: string;
|
||||
////}
|
||||
////
|
||||
////function f({ a }: A | B) {
|
||||
//// a/**/;
|
||||
////}
|
||||
|
||||
verify.baselineQuickInfo();
|
||||
Reference in New Issue
Block a user