-
Notifications
You must be signed in to change notification settings - Fork 1.8k
v2: Refactor task-related properties and improve type definitions #1275
Copy link
Copy link
Closed
Labels
P2Moderate issues affecting some users, edge cases, potentially valuable featureModerate issues affecting some users, edge cases, potentially valuable featureenhancementRequest for a new feature that's not currently supportedRequest for a new feature that's not currently supportedready for workEnough information for someone to start working onEnough information for someone to start working onv2Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixesIdeas, requests and plans for v2 of the SDK which will incorporate major changes and fixes
Metadata
Metadata
Assignees
Labels
P2Moderate issues affecting some users, edge cases, potentially valuable featureModerate issues affecting some users, edge cases, potentially valuable featureenhancementRequest for a new feature that's not currently supportedRequest for a new feature that's not currently supportedready for workEnough information for someone to start working onEnough information for someone to start working onv2Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixesIdeas, requests and plans for v2 of the SDK which will incorporate major changes and fixes
Summary
Refactoring opportunities for the v2 implementation related to task properties and TypeScript type definitions.
Motivation and Context
The current implementation has some patterns that could be improved for better code organization and type safety.
Proposed Changes
1. Group task-related properties
Currently there are multiple
taskXvariables at the same level:Consider grouping these under a single
taskobject:This provides better organization and makes it clearer these properties are related.
2. Distinguish between optional properties and undefined values
In TypeScript:
These have different semantics:
prop?: string- the property may not exist at allprop: string | undefined- the property always exists but may beundefinedWe should audit the codebase and use the appropriate pattern based on actual intent. This affects:
undefined)inchecks vs value checks)Additional context
Low priority - should be addressed if time permits during v2 development.