react-axios-typescript-example icon indicating copy to clipboard operation
react-axios-typescript-example copied to clipboard

fix: improve type safety in TutorialDataService

Open hamed-zeidabadi opened this issue 1 month ago • 0 comments

Replace 'any' type with proper types for better type safety:

  • Change id parameter type from 'any' to 'string' in update() and delete()
  • Change update() return type from 'any' to 'ITutorialData'
  • Reorder update() parameters to (id, data) for consistency with REST conventions
  • Update component calls to match new parameter order

This improves type safety and prevents potential runtime errors from incorrect parameter types.

hamed-zeidabadi avatar Nov 08 '25 05:11 hamed-zeidabadi