-
Notifications
You must be signed in to change notification settings - Fork 252
Closed
Labels
documentationThis is a problem with documentation.This is a problem with documentation.feature-requestA feature should be added or improved.A feature should be added or improved.
Description
🚀 Feature Request
Affected Languages
-
TypeScript
orJavascript
-
Python
-
Java
- .NET (
C#
,F#
, ...)
General Information
- JSII Version: 0.18.0
- Platform: all
- I may be able to implement this feature request
- This feature might incur a breaking change
Description
JSII doesn't allow JSDoc-ing destructured parameters. For example:
/**
* @param bar Example description
*/
public foo({ a, b }: {[key: string]: string}) {
console.log(a, b);
}
throws the following error:
warning TS9999: JSII: In doc block of 'foo', '@param bar' refers to a nonexistent parameter.
In a real-world use:
/**
* Generate an Domain Name health check
*
* @param scope the parent Construct for this Construct
* @param id the logical name of this Construct
* @param props Domain name health check properties
*/
public static domainName(
scope: Construct,
id: string,
{ protocol, ...props }: DomainNameHealthCheckProps
) {
return new EndpointHealthCheck(scope, id, { ...props, ...protocol.options });
}
Proposed Solution
Don't check the parameter name for destructured properties
Metadata
Metadata
Assignees
Labels
documentationThis is a problem with documentation.This is a problem with documentation.feature-requestA feature should be added or improved.A feature should be added or improved.