Skip to content

fix: add missing type definitions for market_protection and KiteTickerParams root#122

Open
ManikLakhanpal wants to merge 2 commits into
zerodha:masterfrom
ManikLakhanpal:fix-type-definitions
Open

fix: add missing type definitions for market_protection and KiteTickerParams root#122
ManikLakhanpal wants to merge 2 commits into
zerodha:masterfrom
ManikLakhanpal:fix-type-definitions

Conversation

@ManikLakhanpal
Copy link
Copy Markdown

This PR fixes two missing type definitions in the published .d.ts files that were left out of sync with their internal interfaces.

Fix 1 — market_protection in placeOrder and modifyOrder (types/connect.d.ts)

market_protection was added to interfaces/connect.ts (PlaceOrderParams and ModifyOrderParams) in #118, but the inline param types in types/connect.d.ts were not updated. TypeScript consumers who pass market_protection get a type error even though the runtime accepts it.

Fix 2 — root in KiteTickerParams (types/ticker.d.ts)

root is already in interfaces/ticker.ts and read by lib/ticker.ts (params.root || 'wss://ws.kite.trade/'), but was missing from the published types/ticker.d.ts, causing a type error for consumers who pass a custom WebSocket endpoint.

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