From 3d8146f4ccd46299c35362f548737749933d9cff Mon Sep 17 00:00:00 2001 From: Felipe Lima Date: Wed, 19 Feb 2025 22:20:54 -0800 Subject: [PATCH] assorted fixes --- README.md | 9 ++++----- babel.config.js | 10 ++++------ src/client/realWsJsonClient.ts | 4 ++-- src/client/wsJsonClientAuth.ts | 2 +- 4 files changed, 11 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 43b4f76..c923d08 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ -# TD Ameritrade WsJson API client +# thinkorswim WsJson API client -This is a node and browser API client for the (undocumented) Schwab WebSocket API. +This is a node and browser API client for the (undocumented) thinkorswim WebSocket API. 🚧 Work in progress 🚧 # Prerequisites -- Node 16+ +- Node 18+ # Building for Node @@ -68,8 +68,7 @@ for await (const event of client.chart(chartRequest)) { } ``` -For more sample usage check out https://github.com/huskly/tda-wsjson-client/blob/master/src/testApp.ts and -https://github.com/huskly/tda-wsjson-client/blob/master/example/src/App.tsx +For more sample usage check out https://github.com/huskly/tos-wsjson-client/blob/master/src/example/testApp.ts # Running tests diff --git a/babel.config.js b/babel.config.js index dd242dc..539f670 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,6 +1,4 @@ -module.exports = { - presets: [ - ["@babel/preset-env", { targets: { node: "current" } }], - "@babel/preset-typescript", - ], -}; +export const presets = [ + ["@babel/preset-env", { targets: { node: "current" } }], + "@babel/preset-typescript", +]; diff --git a/src/client/realWsJsonClient.ts b/src/client/realWsJsonClient.ts index b3d91a9..e6391f8 100644 --- a/src/client/realWsJsonClient.ts +++ b/src/client/realWsJsonClient.ts @@ -131,9 +131,9 @@ export default class RealWsJsonClient implements WsJsonClient { private iterator = new MulticastIterator(this.buffer); private state = ChannelState.DISCONNECTED; private authCode?: string; - // @ts-ignore + // @ts-expect-error private accessToken?: string; - // @ts-ignore + // @ts-expect-error private refreshToken?: string; constructor( diff --git a/src/client/wsJsonClientAuth.ts b/src/client/wsJsonClientAuth.ts index 01a791c..49bb5ad 100644 --- a/src/client/wsJsonClientAuth.ts +++ b/src/client/wsJsonClientAuth.ts @@ -1,7 +1,7 @@ import debug from "debug"; import { WsJsonClient } from "./wsJsonClient.js"; -// @ts-ignore +// @ts-expect-error const logger = debug("wsJsonClientAuth"); export default class WsJsonClientAuth {