TypeScript SDK

Use the TypeScript SDK when your application can run TaxKit calculations in-process. The plain facade is the beginner path. The safe facade returns typed result values. The Effect facade is for advanced service composition and in-process transports.

Entrypoints

EntrypointUse when
@taxkit/sdkYou want TaxKit.calculate, TaxKit.safe.calculate or TaxKit.createClient.
@taxkit/sdk/auYou want Australian calculator helpers and descriptors.
@taxkit/sdk/effectYou want calculateRunRequest, calculateReportRequest, calculateReport or Effect service requirements.
@taxkit/sdk/schemasYou want CalculatorRunRequest, CalculatorRunResponse, CalculatorServiceError and SDK result schemas.

Beginner path

ts
import { Cents, aud } from "@taxkit/core/primitives";
import { au } from "@taxkit/sdk/au";

const report = await au.incomeTax.annual({
  taxableIncome: aud(Cents.make(9_000_000)),
});

Australian helpers keep the first calculation compact while still using the same descriptor and schema contracts as the generic SDK facade.

Generic path

ts
import { Cents, aud } from "@taxkit/core/primitives";
import { TaxKit } from "@taxkit/sdk";
import { au } from "@taxkit/sdk/au";

const report = await TaxKit.calculate(au.calculations.annualIncomeTax, {
  taxableIncome: aud(Cents.make(9_000_000)),
});

Advanced Effect path

Use the Effect SDK when you want to provide PublicCalculatorService through your own Effect layer or when an in-process transport needs the full CalculatorRunResponse.

ts
import { calculateRunRequest } from "@taxkit/sdk/effect";

Next steps

  • Read Plain SDK for Promise-based usage.
  • Read Safe SDK for typed success and failure results.
  • Read Effect SDK for service composition.