{"record":{"id":"a746692a04eed5d4","repo":"oxc-project/oxc","slug":"missing-jsdoc-param-type","errorCode":null,"errorMessage":"Missing JSDoc `@param` type.","messagePattern":"Missing JSDoc `@param` type\\.","errorType":"validation","errorClass":"OxcDiagnostic","httpStatus":null,"severity":"error","filePath":"crates/oxc_linter/src/rules/jsdoc/require_param_type.rs","lineNumber":21,"sourceCode":"\nuse oxc_ast::AstKind;\nuse oxc_diagnostics::OxcDiagnostic;\nuse oxc_macros::declare_oxc_lint;\nuse oxc_span::Span;\nuse oxc_str::CompactStr;\n\nuse crate::{\n    AstNode,\n    context::LintContext,\n    rule::{DefaultRuleConfig, Rule},\n    utils::{\n        ParamKind, collect_params, get_function_nearest_jsdoc_node, should_ignore_as_internal,\n        should_ignore_as_private,\n    },\n};\n\nfn missing_type_diagnostic(span: Span) -> OxcDiagnostic {\n    OxcDiagnostic::warn(\"Missing JSDoc `@param` type.\")\n        .with_help(\"Add {type} to `@param` tag.\")\n        .with_label(span)\n}\n\nfn missing_root_type_diagnostic(span: Span, default_type: &CompactStr) -> OxcDiagnostic {\n    OxcDiagnostic::warn(\"Missing root type for @param.\")\n        .with_help(format!(\"Add {{{default_type}}} to `@param` tag.\"))\n        .with_label(span)\n}\n\n#[derive(Debug, Clone, Deserialize, JsonSchema)]\n#[serde(rename_all = \"camelCase\", default, deny_unknown_fields)]\npub struct RequireParamTypeConfig {\n    /// The type string to set by default for destructured roots. Defaults to \"object\".\n    default_destructured_root_type: CompactStr,\n    /// Whether to set a default destructured root type. For example, you may wish to avoid manually having to set the type for a `@param` corresponding to a destructured root object as it is always going to be an object. Uses `defaultDestructuredRootType` for the type string. Defaults to `false`.\n    set_default_destructured_root_type: bool,\n}","sourceCodeStart":3,"sourceCodeEnd":39,"githubUrl":"https://github.com/oxc-project/oxc/blob/e1e7af627c8843ab64044ed466b128fcc21a035b/crates/oxc_linter/src/rules/jsdoc/require_param_type.rs#L3-L39","documentation":"Fires from jsdoc/require-param-type when a @param tag names the parameter but omits its type annotation (the '{type}' braces). The helper labels the tag span; the help mentions adding {type} per the rule's typing expectations.","triggerScenarios":"Thrown at crates/oxc_linter/src/rules/jsdoc/require_param_type.rs:21 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add a type in braces, e.g. `@param {string} name - ...`","Use `{*}` if the type is genuinely unknown"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e1e7af627c8843ab64044ed466b128fcc21a035b","analyzedAt":"2026-08-20T07:01:07.079Z","contentChangedAt":"2026-08-20T07:01:07.079Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}