fix(sandbox): add missing type declarations to SandboxedJob interface#3946
Merged
roggervalf merged 1 commit intotaskforcesh:masterfrom Apr 8, 2026
Conversation
1183d5c to
dbb8ede
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the sandboxed processor TypeScript surface so SandboxedJob’s type declarations match the methods already available at runtime via IPC.
Changes:
- Adds
getChildrenValues,getIgnoredChildrenFailures, andgetDependenciesCountto theSandboxedJobinterface. - Adds explicit return type annotations (and corresponding casts) to the sandbox proxy implementations in
ChildProcessor.wrapJob().
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/interfaces/sandboxed-job.ts | Extends the public SandboxedJob interface with missing method declarations for dependency/children helpers. |
| src/classes/child-processor.ts | Annotates IPC proxy methods with explicit return types to align with the updated interface. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add getChildrenValues, getIgnoredChildrenFailures, and getDependenciesCount method declarations to the SandboxedJob interface. These methods are already implemented in wrapJob() and functional at runtime via IPC, but were missing from the TypeScript interface, forcing users to use type assertions. Also adds explicit return type annotations and type casts to the corresponding proxy methods in child-processor.ts for type safety. Closes taskforcesh#3925
dbb8ede to
804921c
Compare
roggervalf
approved these changes
Apr 8, 2026
Contributor
|
🎉 This PR is included in version 5.73.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Contributor
|
🎉 This PR is included in version 2.20.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
Bug fix — aligns TypeScript type declarations with existing runtime behavior.
What is the current behavior?
The
SandboxedJobinterface is missing type declarations forgetChildrenValues,getIgnoredChildrenFailures, andgetDependenciesCount. These methods are fully implemented at runtime inwrapJob()(inchild-processor.ts) and work correctly via IPC in sandboxed processors, but TypeScript users cannot access them without type assertions like(job as any).getChildrenValues().Closes #3925
What is the new behavior?
The
SandboxedJobinterface now includes type declarations for:getChildrenValues<CT = any>()— ReturnsPromise<{ [jobKey: string]: CT }>, matching theJob.getChildrenValues()signaturegetIgnoredChildrenFailures()— ReturnsPromise<{ [jobKey: string]: string }>, matchingJob.getIgnoredChildrenFailures()getDependenciesCount(opts?)— ReturnsPromise<{ failed?: number; ignored?: number; processed?: number; unprocessed?: number }>, matchingJob.getDependenciesCount()The proxy implementations in
child-processor.tsalso now have explicit return type annotations and type casts for consistency.Additional context
getChildrenValues/getIgnoredChildrenFailures, feat(sandbox): add getDependenciesCount proxy for sandboxed processors #3923 forgetDependenciesCount)JobclassgetDependenciesproxy) explicitly noted that the interface was left unchanged, deferring to this kind of follow-up