Skip to content

Ashwin/fix strict ts errors #937

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

MrHaikuSwan
Copy link

@MrHaikuSwan MrHaikuSwan commented Aug 1, 2025

why

Stagehand doesn't have TS strict mode on, which causes confusing things to happen for users of the library (e.g. receiving undefined from a function whose return type is string).

what changed

  • "strict": true added to tsconfig.json
  • typing + handling throughout Stagehand to pass TS strict mode checks

test plan

Build successfully + validate against existing evaluations to ensure no behavior changes

This is my first pass at it, there's still a bunch of errors left + some errors I don't have enough context to definitively fix (cc. @miguelg719)

I've left comments throughout as comments prefixed // NOTE: , and sectioned out groups of changes into commits so that each commit should be easy to understand for a reviewer

Copy link

changeset-bot bot commented Aug 1, 2025

⚠️ No Changeset found

Latest commit: e36891b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

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