react-axios-typescript-example
react-axios-typescript-example copied to clipboard
fix: improve type safety in TutorialDataService
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.