remove-parameter-not-found
@azure-tools/typespec-client-generator-core/remove-parameter-not-foundSeverity: error
This diagnostic is issued when removeParameter is called with a selector that does not match any parameter on the operation.
Impact
Section titled “Impact”- Area: Client customization transformations. Blocks
removeParameterfrom producing the intended customized signature because the selector does not match an operation parameter. - Not affected: The original operation parameter list is unchanged.
❌ Incorrect Usage
Section titled “❌ Incorrect Usage”@servicenamespace MyService { op myOp(existingParam?: string): void;}
alias Modified = removeParameter(MyService.myOp, "missingParam"); // `missingParam` is not a parameter of `myOp`Diagnostic Message
Section titled “Diagnostic Message”TCGC reports:
Parameter "missingParam" not found in operation "myOp".✅ How to Fix
Section titled “✅ How to Fix”Use the exact name or model property reference for an existing operation parameter.
@servicenamespace MyService { op myOp(existingParam?: string): void;}
alias Modified = removeParameter(MyService.myOp, "existingParam");