-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Hi. Sorry, my helpful robot insists it found something. I obviously don't have a clue. Please excuse me and close if it's shrooms...
Severity: Medium — forces callers to pass dummy values.
Error:
Argument of type 'undefined' is not assignable to parameter of type 'string'.
at new TypeaheadField(id, name, undefined, resolver, "TEXT") — the third argument (description) is typed as string but many callers don't have a description.
Current declaration:
constructor(
id: string,
name: string,
description: string, // ← required
resolver?: TypeaheadResolver | undefined,
suggestionType?: SuggestionType
);Proposed fix:
Make description optional with a default:
constructor(
id: string,
name: string,
description?: string, // ← optional
resolver?: TypeaheadResolver | undefined,
suggestionType?: SuggestionType
);or, if changing the positional API is undesirable, accept string | undefined:
constructor(
id: string,
name: string,
description: string | undefined,
resolver?: TypeaheadResolver | undefined,
suggestionType?: SuggestionType
);and default to "" in the body:
this.description = description ?? "";Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels