Skip to content

SK-2110: fix typescript types in interfaces for react sdk#214

Merged
skyflow-himanshu merged 2 commits intorelease/26.3.1from
himanshu/SK-2110-identify-and-fix-gaps-in-typescript-public-interfaces-react-sdk
Mar 2, 2026
Merged

SK-2110: fix typescript types in interfaces for react sdk#214
skyflow-himanshu merged 2 commits intorelease/26.3.1from
himanshu/SK-2110-identify-and-fix-gaps-in-typescript-public-interfaces-react-sdk

Conversation

@skyflow-himanshu
Copy link
Collaborator

Why:
Fix gaps in typescript public interfaces and add typescript support.

Goal:
Identify and fix gaps in typescript public interfaces for React SDK.
Add comprehensive TypeScript type definitions.

@github-actions
Copy link

Gitleaks Findings: No secrets detected. Safe to proceed!

@github-actions
Copy link

Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging.

@github-actions
Copy link

Gitleaks Findings: No secrets detected. Safe to proceed!

@github-actions
Copy link

Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging.

@skyflow-himanshu skyflow-himanshu changed the base branch from main to release/26.2.4 February 26, 2026 11:29
@skyflow-bharti skyflow-bharti changed the base branch from release/26.2.4 to main February 26, 2026 11:32
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request enhances TypeScript support for the React SDK by adding comprehensive type definitions and fixing gaps in public interfaces. The changes improve type safety across hooks, elements, utilities, and the event system while maintaining backward compatibility.

Changes:

  • Added new common type definitions including StylesConfig, ElementClassesConfig, CollectElementState, EventCallback, EventCallbackFunction, and ComposableSubmitResponse
  • Updated hooks and elements to use proper TypeScript types instead of any or unknown
  • Enhanced EventEmitter class with proper type annotations
  • Fixed sample code to use string values for fontWeight CSS property

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/common/index.ts New file defining core TypeScript interfaces and types for the SDK
src/index.ts Exports new type definitions for public API consumption
src/utils/event-emitter/index.ts Added proper types for event callbacks and event records
src/hooks/CollectContainer/index.ts Added ContainerOptions type parameter
src/hooks/ComposableContainer/index.ts Added required ContainerOptions type parameter
src/hooks/RevealContainer/index.ts Added optional ContainerOptions type parameter
src/hooks/MakeSkyflowStyles/index.ts Replaced generic Record type with specific StylesConfig type
src/elements/index.ts Updated element props to use ElementClassesConfig and CollectElementState types
src/elements/RevealElement/index.tsx Removed unused imports, added proper type for element state, added eslint comment
src/elements/FileRenderElement/index.tsx Added proper type for element state, added eslint comment
src/elements/ComposableContainer/index.tsx Added ComposableSubmitResponse type for onSubmit handler
tests/elements/collectElements.test.tsx Enhanced event emitter mock with all required methods, added explicit any type
samples/SkyflowElements/src/components/DynamicComposableElements/index.tsx Fixed fontWeight to use string type, improved formatting
samples/SkyflowElements/src/components/ComposableElements/index.tsx Fixed fontWeight to use string type
samples/SkyflowElements/src/components/CardBrandChoice/index.tsx Removed commented-out dropdown styling code

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link

Gitleaks Findings: No secrets detected. Safe to proceed!

@github-actions
Copy link

Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging.

@skyflow-himanshu skyflow-himanshu changed the base branch from main to release/26.3.1 March 2, 2026 08:36
@skyflow-himanshu skyflow-himanshu merged commit b9ab67d into release/26.3.1 Mar 2, 2026
13 of 14 checks passed
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.

5 participants