Skip to content

Give the Context script API meaningful types#2478

Merged
soulgalore merged 1 commit into
mainfrom
script-type-quality
May 20, 2026
Merged

Give the Context script API meaningful types#2478
soulgalore merged 1 commit into
mainfrom
script-type-quality

Conversation

@soulgalore
Copy link
Copy Markdown
Member

The two arguments script authors always touch — context.options and
context.result — were typed as bare Object, so "context.options."
returned no completions in any editor. Re-type them (and the taskData
scratch space) as Record<string, any>, which keeps the runtime behavior
unchanged but lets IntelliSense show what's there. Move "target" inside
compilerOptions where it actually takes effect, and drop a couple of
@typedef blocks that had been parked inside a constructor body.

Co-authored-by: Claude noreply@anthropic.com

Change-Id: I079355e096d366c6cc328ee2c2cb23491f4250a6

  The two arguments script authors always touch — context.options and
  context.result — were typed as bare Object, so "context.options."
  returned no completions in any editor. Re-type them (and the taskData
  scratch space) as Record<string, any>, which keeps the runtime behavior
  unchanged but lets IntelliSense show what's there. Move "target" inside
  compilerOptions where it actually takes effect, and drop a couple of
  @typedef blocks that had been parked inside a constructor body.

  Co-authored-by: Claude noreply@anthropic.com

Change-Id: I079355e096d366c6cc328ee2c2cb23491f4250a6
@soulgalore soulgalore merged commit f946c13 into main May 20, 2026
16 checks passed
@soulgalore soulgalore deleted the script-type-quality branch May 20, 2026 06:33
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.

1 participant