mirror of
https://github.com/bendtherules/repro-typedoc-issue-jsdoc.git
synced 2026-08-18 13:53:33 +00:00
Remove types.ts and usage
This commit is contained in:
-15
@@ -12,21 +12,6 @@ const Calculations = {
|
||||
return maxPrice;
|
||||
},
|
||||
|
||||
/**
|
||||
* Get total value of the order from order config
|
||||
* @returns {number} - Output A
|
||||
* @param {import('./types').OrderConfig} orderConfig - Input A
|
||||
* @param {import('./types').SidPriceMap} sidPriceMap - Input B
|
||||
*/
|
||||
calculateOrderTotalValue: function calculateOrderTotalValue(orderConfig, sidPriceMap) {
|
||||
const totalValue = orderConfig.reduce((prevValue, eachSidConfig) => {
|
||||
const sidPrice = sidPriceMap[eachSidConfig.sid];
|
||||
const currentConfigValue = sidPrice * eachSidConfig.shares;
|
||||
return (prevValue + currentConfigValue);
|
||||
}, 0);
|
||||
|
||||
return totalValue;
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = Calculations;
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
export type sid = string;
|
||||
|
||||
export interface OrderConfigElement {
|
||||
sid: sid;
|
||||
shares: number,
|
||||
}
|
||||
|
||||
export type OrderConfig = Array<OrderConfigElement>;
|
||||
|
||||
export interface SidPriceMap {
|
||||
[sid: string]: number;
|
||||
}
|
||||
Reference in New Issue
Block a user