Resolve "Create universal interface for exchange data" #22
@ -1,5 +1,22 @@
|
|||||||
export class Quote {
|
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<Quote>;
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user