Skip to content

fix: enhance type definitions #111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 19, 2025
Merged

fix: enhance type definitions #111

merged 2 commits into from
Aug 19, 2025

Conversation

damonbauer
Copy link
Owner

  • Adds SectionData generic to getItemLayout function
  • Exports a type for the getItemLayout function
  • Additional small cleanup of arguments

Closes #110 (thanks, @andrejpavlovic)

@damonbauer damonbauer requested a review from Copilot August 19, 2025 11:24
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances type definitions for the getItemLayout function by adding generic support for section data types and improving type safety. The changes address issue #110 by providing better TypeScript support and making the function more flexible for different data structures.

  • Adds generic SectionT parameter to support custom section data types
  • Exports a new GetItemLayoutFunction type for better type inference
  • Updates parameter names for consistency and improves null checking logic

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

github-actions bot commented Aug 19, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 100% 77 / 77
🔵 Statements 100% 77 / 77
🔵 Functions 100% 2 / 2
🔵 Branches 100% 19 / 19
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/index.ts 100% 100% 100% 100%
Generated in workflow #279 for commit 09ac0a5 by the Vitest Coverage Report Action

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@damonbauer damonbauer merged commit a698990 into master Aug 19, 2025
1 check passed
@damonbauer damonbauer deleted the db/section-data-type branch August 19, 2025 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

allow typing of section data
1 participant