2424 * [ ` checkDestructuredRoots ` ] ( #user-content-require-param-options-checkdestructuredroots )
2525 * [ ` useDefaultObjectProperties ` ] ( #user-content-require-param-options-usedefaultobjectproperties )
2626 * [ ` ignoreWhenAllParamsMissing ` ] ( #user-content-require-param-options-ignorewhenallparamsmissing )
27+ * [ ` interfaceExemptsParamsCheck ` ] ( #user-content-require-param-options-interfaceexemptsparamscheck )
2728* [ Context and settings] ( #user-content-require-param-context-and-settings )
2829* [ Failing examples] ( #user-content-require-param-failing-examples )
2930* [ Passing examples] ( #user-content-require-param-passing-examples )
@@ -445,6 +446,17 @@ supplied as default values. Defaults to `false`.
445446Set to ` true ` to ignore reporting when all params are missing. Defaults to
446447` false ` .
447448
449+ <a name =" user-content-require-param-options-interfaceexemptsparamscheck " ></a >
450+ <a name =" require-param-options-interfaceexemptsparamscheck " ></a >
451+ ### <code >interfaceExemptsParamsCheck</code >
452+
453+ Set if you wish TypeScript interfaces to exempt checks for the existence of
454+ ` @param ` 's.
455+
456+ Will check for a type defining the function itself (on a variable
457+ declaration) or if there is a single destructured object with a type.
458+ Defaults to ` false ` .
459+
448460<a name =" user-content-require-param-context-and-settings " ></a >
449461<a name =" require-param-context-and-settings " ></a >
450462## Context and settings
@@ -455,7 +467,7 @@ Set to `true` to ignore reporting when all params are missing. Defaults to
455467| Tags | ` param ` |
456468| Aliases | ` arg ` , ` argument ` |
457469| Recommended | true|
458- | Options | ` autoIncrementBase ` , ` checkConstructors ` , ` checkDestructured ` , ` checkDestructuredRoots ` , ` checkGetters ` , ` checkRestProperty ` , ` checkSetters ` , ` checkTypesPattern ` , ` contexts ` , ` enableFixer ` , ` enableRestElementFixer ` , ` enableRootFixer ` , ` exemptedBy ` , ` ignoreWhenAllParamsMissing ` , ` unnamedRootBase ` , ` useDefaultObjectProperties ` |
470+ | Options | ` autoIncrementBase ` , ` checkConstructors ` , ` checkDestructured ` , ` checkDestructuredRoots ` , ` checkGetters ` , ` checkRestProperty ` , ` checkSetters ` , ` checkTypesPattern ` , ` contexts ` , ` enableFixer ` , ` enableRestElementFixer ` , ` enableRootFixer ` , ` exemptedBy ` , ` ignoreWhenAllParamsMissing ` , ` interfaceExemptsParamsCheck ` , ` unnamedRootBase ` , ` useDefaultObjectProperties ` |
459471| Settings | ` ignoreReplacesDocs ` , ` overrideReplacesDocs ` , ` augmentsExtendsReplacesDocs ` , ` implementsReplacesDocs ` |
460472
461473<a name =" user-content-require-param-failing-examples " ></a >
@@ -1185,6 +1197,25 @@ function quux (a, b) {}
11851197export type Test = (foo : number ) => string ;
11861198// "jsdoc/require-param": ["error"|"warn", {"contexts":["TSFunctionType"]}]
11871199// Message: Missing JSDoc @param "foo" declaration.
1200+
1201+ /**
1202+ *
1203+ */
1204+ const quux = function quux (foo ) {
1205+ };
1206+ // "jsdoc/require-param": ["error"|"warn", {"interfaceExemptsParamsCheck":true}]
1207+ // Message: Missing JSDoc @param "foo" declaration.
1208+
1209+ /**
1210+ *
1211+ */
1212+ function quux ({
1213+ abc ,
1214+ def
1215+ }) {
1216+ }
1217+ // "jsdoc/require-param": ["error"|"warn", {"interfaceExemptsParamsCheck":true}]
1218+ // Message: Missing JSDoc @param "root0" declaration.
11881219````
11891220
11901221
@@ -1853,5 +1884,22 @@ function myFunction(foo: string): void;
18531884 */
18541885function myFunction(): void ;
18551886function myFunction(foo ? : string ) {}
1887+
1888+ /**
1889+ *
1890+ */
1891+ const quux: FunctionInterface = function quux (foo ) {
1892+ };
1893+ // "jsdoc/require-param": ["error"|"warn", {"interfaceExemptsParamsCheck":true}]
1894+
1895+ /**
1896+ *
1897+ */
1898+ function quux ({
1899+ abc ,
1900+ def
1901+ }: FunctionInterface ) {
1902+ }
1903+ // "jsdoc/require-param": ["error"|"warn", {"interfaceExemptsParamsCheck":true}]
18561904````
18571905
0 commit comments