TypeScript/tests/cases/fourslash/refactorConvertParamsToDestructuredObject_functionJSDoc.ts
Gabriela Araujo Britto 84087d0e0a
Use shorthand property assignment in convert parameters to object (#30468)
* create shorthand property assignment in argument object when possible

* add shorthand property assignment test

* don't offer refactor on jsdoc comment

* add jsdoc test

* improve jsdoc test

* use crlf
2019-03-19 09:28:09 -07:00

18 lines
786 B
TypeScript

/// <reference path='fourslash.ts' />
/////**
//// * Return the boolean state of attribute from an element
//// * /*a*/@param/*b*/ el The source of the attributes.
//// * @param atty Name of the attribute or a string of candidate attribute names.
//// * @param def Default boolean value when attribute is undefined.
//// */
////export function /*c*/getBoolFromAttribute/*d*/(
//// /*e*//** inline JSDoc *//*f*/ attr: string | string[],
//// def: boolean = false): boolean { }
goTo.select("a", "b");
verify.not.refactorAvailable("Convert parameters to destructured object");
goTo.select("c", "d");
verify.refactorAvailable("Convert parameters to destructured object");
goTo.select("e", "f");
verify.refactorAvailable("Convert parameters to destructured object");