Skip to content

Conversation

@notdanilo
Copy link
Contributor

@notdanilo notdanilo commented Feb 17, 2025

Status Type ⚠️ Core Change Issue
Ready Feature No None

Problem

ApplySystem input data only accepts JSON objects when it should accept any kind of JSON type (Object, Array, String, ...)

Solution

Change TS type from object to any

Greptile Summary

This PR modifies the ApplySystem function in the Bolt SDK to accept any JSON-serializable type as input, rather than being restricted to only objects.

  • Changed args parameter type from object to any in /clients/bolt-sdk/src/world/transactions.ts to support arrays, strings and other JSON types
  • Maintains backward compatibility since objects are still valid JSON-serializable inputs
  • Affects type safety by removing object-type constraints, but increases flexibility for different data structures
  • Aligns with the underlying program which can handle any serialized JSON data

@notdanilo notdanilo changed the title ✨ TS ApplySystem now takes any JSON serializable as input ✨ TypeScript ApplySystem now takes any JSON serializable as input Feb 17, 2025
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

@notdanilo notdanilo merged commit b1e8373 into main Feb 17, 2025
5 checks passed
@GabrielePicco GabrielePicco deleted the feature/typescript-apply-system-taking-any-json-serializable branch April 25, 2025 15:17
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.

2 participants