dsherret / dsherret/ts-morph

Consider Exposing `cancellationToken` in Signatures

Open
#1,618 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
6.2k
Forks
238
Avg merge
2m
Merged PRs (30d)
1

Description

In methods like `getPreEmitDiagnostics` a `CancellationToken` should probably be exposed. I'm running multiple TypeScript jobs in parallel and want to be able to cancel them. I think this would mostly just entail passing through the parameter to the underlying functions.

I'd be willing to contribute this if you'd like.

Contributor guide

Open the contributing guide

Research direction

Start with the getPreEmitDiagnostics signatures and trace the underlying functions they call. Check how TypeScript represents CancellationToken, then identify the related methods that should accept and pass it through; done means callers can cancel parallel TypeScript jobs through the exposed signatures.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.