Skip to content

Commit

Permalink
[Chore][OAS] Remove use of any in generator lib utility (elastic#19…
Browse files Browse the repository at this point in the history
…2440)

## Summary

Tiny change, using a cast to `Record` instead of relying on `any`.
  • Loading branch information
jloleysens authored Sep 13, 2024
1 parent 8ce63ab commit 9c18dfa
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ export const processDiscontinued = (schema: OpenAPIV3.SchemaObject): void => {
};

/** Just for type convenience */
export const deleteField = (schema: Record<any, unknown>, field: string): void => {
delete schema[field];
export const deleteField = (schema: object, field: string): void => {
delete (schema as Record<string, unknown>)[field];
};

export const isAnyType = (schema: OpenAPIV3.SchemaObject): boolean => {
Expand Down

0 comments on commit 9c18dfa

Please sign in to comment.