Skip to content

Fix type inconsistency in DatasetWrapper method signatures#15

Closed
Copilot wants to merge 2 commits intochore/update-dataset-wrapperfrom
copilot/sub-pr-14
Closed

Fix type inconsistency in DatasetWrapper method signatures#15
Copilot wants to merge 2 commits intochore/update-dataset-wrapperfrom
copilot/sub-pr-14

Conversation

Copy link

Copilot AI commented Feb 12, 2026

The subjectsOf and objectsOf methods used a toTerm helper that accepts string | Term, but their predicate and graph parameters were typed as only string, preventing TypeScript callers from passing Term objects.

Changes:

  • Widened predicate and graph parameters to string | Term in both methods
  • Aligns with existing object and subject parameters which already accept string | Term
// Before: only strings allowed for predicate/graph
protected* subjectsOf<T>(
  termWrapper: TermWrapperConstructor<T>,
  predicate?: string,
  object?: string | Term,
  graph?: string
): Iterable<T>

// After: consistent Term support
protected* subjectsOf<T>(
  termWrapper: TermWrapperConstructor<T>,
  predicate?: string | Term,
  object?: string | Term,
  graph?: string | Term
): Iterable<T>

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: jeswr <63333554+jeswr@users.noreply.github.com>
Copilot AI changed the title [WIP] Update dataset wrapper based on feedback Fix type inconsistency in DatasetWrapper method signatures Feb 12, 2026
Copilot AI requested a review from jeswr February 12, 2026 15:02
Copy link
Collaborator

@langsamu langsamu left a comment

Choose a reason for hiding this comment

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

I think that none of these arguments should be a Term. Choosing strings is an intentional design choice. Like many other design choices, it is not yet documented.

@jeswr jeswr closed this Feb 13, 2026
@jeswr jeswr deleted the copilot/sub-pr-14 branch February 13, 2026 16:52
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.

3 participants