Skip to content

Commit

Permalink
Do not export internal types and functions (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
webcarrot authored Jun 11, 2024
1 parent 1976ba4 commit 0285417
Showing 1 changed file with 5 additions and 20 deletions.
25 changes: 5 additions & 20 deletions mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,12 @@ export type CashFlow = {
readonly date: Date;
};

/**
* @deprecated Should be internal
*/
export type CashFlowNormalized = {
type CashFlowNormalized = {
readonly amount: number;
readonly date: number;
};

/**
* @deprecated Should be internal
*/
export function calculateResult(
function calculateResult(
flowsFrom1: ReadonlyArray<CashFlowNormalized>,
r: number
): number {
Expand All @@ -36,10 +30,7 @@ export function calculateResult(
return result;
}

/**
* @deprecated Should be internal
*/
export function calculateResultDerivation(
function calculateResultDerivation(
flowsFrom1: ReadonlyArray<CashFlowNormalized>,
r: number
): number {
Expand All @@ -58,10 +49,7 @@ function flowLt0({ amount }: CashFlowNormalized): boolean {
return amount < 0;
}

/**
* @deprecated Should be internal
*/
export function calculate(
function calculate(
flows: ReadonlyArray<CashFlowNormalized>,
guessRate: number = 0.1,
maxEpsilon: number = 1e-10,
Expand Down Expand Up @@ -138,10 +126,7 @@ function sortCashFlows(
return a - b;
}

/**
* @deprecated Should be internal
*/
export function normalize(
function normalize(
flows: ReadonlyArray<CashFlow>
): ReadonlyArray<CashFlowNormalized> {
const flowsN = flows
Expand Down

0 comments on commit 0285417

Please sign in to comment.