From de315f0524d04de75b15f5ca198d4dc604a43f05 Mon Sep 17 00:00:00 2001 From: Carter Bertolini Date: Tue, 10 Oct 2023 16:35:55 -0400 Subject: [PATCH] Moved Exchange into its own file and added type exports --- src/index.ts | 33 +++++++++++---------------------- src/interface/exchange.ts | 23 +++++++++++++++++++++++ 2 files changed, 34 insertions(+), 22 deletions(-) create mode 100644 src/interface/exchange.ts diff --git a/src/index.ts b/src/index.ts index 4a66d9b..8679f1c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,23 +1,12 @@ -import { PortfolioProvider } from "./interface/portfolio"; -import { QuoteProvider } from "./interface/quote"; +import { Exchange } from "./interface/exchange"; +import { Position, Portfolio, PortfolioProvider } from "./interface/portfolio"; +import { Quote, QuoteProvider } from "./interface/quote"; -/** - * Represents an exchange, which provides access to a portfolio provider and a quote provider. - */ -export interface Exchange { - - /** - * The portfolio provider for the exchange. - */ - readonly portfolioProvider: PortfolioProvider; - - /** - * The quote provider for the exchange. - */ - readonly quoteProvider: QuoteProvider; - - /** - * The name of the exchange. - */ - readonly name: string; -} +export { + Exchange, + Position, + Portfolio, + PortfolioProvider, + Quote, + QuoteProvider +} \ No newline at end of file diff --git a/src/interface/exchange.ts b/src/interface/exchange.ts new file mode 100644 index 0000000..a396215 --- /dev/null +++ b/src/interface/exchange.ts @@ -0,0 +1,23 @@ +import { PortfolioProvider } from "./portfolio"; +import { QuoteProvider } from "./quote"; + +/** + * Represents an exchange, which provides access to a portfolio provider and a quote provider. + */ +export interface Exchange { + + /** + * The portfolio provider for the exchange. + */ + readonly portfolioProvider: PortfolioProvider; + + /** + * The quote provider for the exchange. + */ + readonly quoteProvider: QuoteProvider; + + /** + * The name of the exchange. + */ + readonly name: string; +} \ No newline at end of file