From d8ebcf99fb1fde58a34ae728b63247267d97b0f5 Mon Sep 17 00:00:00 2001 From: Carter Bertolini Date: Fri, 6 Oct 2023 16:25:54 -0400 Subject: [PATCH] Added Quote interface --- src/interface/quote.ts | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/interface/quote.ts b/src/interface/quote.ts index afbf7db..1160da3 100644 --- a/src/interface/quote.ts +++ b/src/interface/quote.ts @@ -1,5 +1,22 @@ export class Quote { - + readonly companyName: string; + + readonly earningsPerShare: number; + readonly estimatedEarnings: number; + + readonly lastTrade: number; + + readonly symbol: string; + + constructor(companyName: string, earningsPerShare: number, estimatedEarnings: number, lastTrade: number, symbol: string) { + this.companyName = companyName; + this.earningsPerShare = earningsPerShare; + this.estimatedEarnings = estimatedEarnings; + this.lastTrade = lastTrade; + this.symbol = symbol; + } } - +export interface QuoteProvider { + readonly fetchQuote: (symbol: string) => Promise; +}