Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Breaking] Implement Scottish Taxes, refactor public API #21

Merged
merged 8 commits into from
Apr 25, 2024

Conversation

sgb-io
Copy link
Member

@sgb-io sgb-io commented Apr 25, 2024

Adds support for Scottish Taxes

  • [Breaking] Changes the return shape of calculateIncomeTax (details below)
  • Updates the public APIs to accept a new, optional country argument

calculateIncomeTax now returns either EnglishIncomeTax or ScottishIncomeTax:

export interface EnglishIncomeTax {
  incomeTaxType: "England/NI/Wales";
  total: number;
  breakdown: {
    basicRateTax: number;
    higherRateTax: number;
    additionalRateTax: number;
  };
}

export interface ScottishIncomeTax {
  incomeTaxType: "Scotland";
  total: number;
  breakdown: {
    starterRateTax: number;
    basicRateTax: number;
    intermediateRateTax: number;
    higherRateTax: number;
    advancedRateTax: number;
    topRateTax: number;
  };
}

@sgb-io sgb-io merged commit be6fb49 into main Apr 25, 2024
2 checks passed
@sgb-io sgb-io deleted the feat/scottish-taxes branch April 25, 2024 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant