us-tax-advantaged-params 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +56 -0
- package/LICENSE +21 -0
- package/README.md +413 -0
- package/SOURCES.md +68 -0
- package/data/retirement-parameters.json +5239 -0
- package/dist/cjs/USTaxAdvantagedParams.js +7930 -0
- package/dist/cjs/USTaxAdvantagedParams.js.map +1 -0
- package/dist/cjs/package.json +3 -0
- package/dist/esm/USTaxAdvantagedParams.js +7918 -0
- package/dist/esm/USTaxAdvantagedParams.js.map +1 -0
- package/dist/types/USTaxAdvantagedParams.d.cts +482 -0
- package/dist/types/USTaxAdvantagedParams.d.ts +482 -0
- package/package.json +89 -0
|
@@ -0,0 +1,482 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* us-tax-advantaged-params
|
|
3
|
+
*
|
|
4
|
+
* A dependency-free U.S. tax-advantaged account parameter engine. Retirement
|
|
5
|
+
* accounts are the coverage today: contribution limits, phase-outs, shared
|
|
6
|
+
* statutory limits, and Roth conversions. The annual parameter table is generated from
|
|
7
|
+
* data/retirement-parameters.json; do not edit the generated block manually.
|
|
8
|
+
*
|
|
9
|
+
* This package calculates statutory contribution ceilings and federal income
|
|
10
|
+
* deltas. It deliberately does not calculate investment returns, distributions,
|
|
11
|
+
* RMDs, plan nondiscrimination testing, state income tax, or actuarially
|
|
12
|
+
* determined defined-benefit/cash-balance contributions.
|
|
13
|
+
*/
|
|
14
|
+
export declare const PACKAGE_NAME: "us-tax-advantaged-params";
|
|
15
|
+
export declare const ENGINE_VERSION: "0.1.0";
|
|
16
|
+
export type Money = number;
|
|
17
|
+
export type PersonRole = "taxpayer" | "spouse" | "other";
|
|
18
|
+
export type EmployerContributionTaxTreatment = "pretax" | "roth";
|
|
19
|
+
export type ContributionPreference = "account_type" | "pretax_first" | "roth_first";
|
|
20
|
+
export type SimpleEmployerContributionMethod = "match_3_percent" | "nonelective_2_percent" | "custom";
|
|
21
|
+
export declare enum FilingStatus {
|
|
22
|
+
SINGLE = "single",
|
|
23
|
+
MARRIED_FILING_JOINTLY = "married_filing_jointly",
|
|
24
|
+
MARRIED_FILING_SEPARATELY = "married_filing_separately",
|
|
25
|
+
HEAD_OF_HOUSEHOLD = "head_of_household",
|
|
26
|
+
QUALIFYING_SURVIVING_SPOUSE = "qualifying_surviving_spouse"
|
|
27
|
+
}
|
|
28
|
+
export declare enum AccountType {
|
|
29
|
+
TRADITIONAL_IRA = "traditional_ira",
|
|
30
|
+
ROTH_IRA = "roth_ira",
|
|
31
|
+
ROLLOVER_IRA = "rollover_ira",
|
|
32
|
+
PAYROLL_DEDUCTION_IRA = "payroll_deduction_ira",
|
|
33
|
+
DEEMED_TRADITIONAL_IRA = "deemed_traditional_ira",
|
|
34
|
+
DEEMED_ROTH_IRA = "deemed_roth_ira",
|
|
35
|
+
INHERITED_TRADITIONAL_IRA = "inherited_traditional_ira",
|
|
36
|
+
INHERITED_ROTH_IRA = "inherited_roth_ira",
|
|
37
|
+
SEP_IRA = "sep_ira",
|
|
38
|
+
ROTH_SEP_IRA = "roth_sep_ira",
|
|
39
|
+
SIMPLE_IRA = "simple_ira",
|
|
40
|
+
ROTH_SIMPLE_IRA = "roth_simple_ira",
|
|
41
|
+
SARSEP_IRA = "sarsep_ira",
|
|
42
|
+
TRADITIONAL_401K = "traditional_401k",
|
|
43
|
+
ROTH_401K = "roth_401k",
|
|
44
|
+
SOLO_401K = "solo_401k",
|
|
45
|
+
ROTH_SOLO_401K = "roth_solo_401k",
|
|
46
|
+
SIMPLE_401K = "simple_401k",
|
|
47
|
+
ROTH_SIMPLE_401K = "roth_simple_401k",
|
|
48
|
+
STARTER_401K = "starter_401k",
|
|
49
|
+
TRADITIONAL_403B = "traditional_403b",
|
|
50
|
+
ROTH_403B = "roth_403b",
|
|
51
|
+
SAFE_HARBOR_403B_DEFERRAL_ONLY = "safe_harbor_403b_deferral_only",
|
|
52
|
+
GOVERNMENTAL_457B = "governmental_457b",
|
|
53
|
+
ROTH_GOVERNMENTAL_457B = "roth_governmental_457b",
|
|
54
|
+
NONGOVERNMENTAL_457B = "nongovernmental_457b",
|
|
55
|
+
SECTION_457F = "section_457f",
|
|
56
|
+
TRADITIONAL_TSP = "traditional_tsp",
|
|
57
|
+
ROTH_TSP = "roth_tsp",
|
|
58
|
+
SECTION_401A = "section_401a",
|
|
59
|
+
PROFIT_SHARING_PLAN = "profit_sharing_plan",
|
|
60
|
+
MONEY_PURCHASE_PLAN = "money_purchase_plan",
|
|
61
|
+
KEOGH_PLAN = "keogh_plan",
|
|
62
|
+
ESOP = "esop",
|
|
63
|
+
DEFINED_BENEFIT_PLAN = "defined_benefit_plan",
|
|
64
|
+
CASH_BALANCE_PLAN = "cash_balance_plan"
|
|
65
|
+
}
|
|
66
|
+
export declare enum ConversionType {
|
|
67
|
+
IRA_TO_ROTH_IRA = "ira_to_roth_ira",
|
|
68
|
+
QUALIFIED_PLAN_TO_ROTH_IRA = "qualified_plan_to_roth_ira",
|
|
69
|
+
IN_PLAN_ROTH_ROLLOVER = "in_plan_roth_rollover"
|
|
70
|
+
}
|
|
71
|
+
export declare enum CalculationStatus {
|
|
72
|
+
DETERMINATE = "determinate",
|
|
73
|
+
DETERMINATE_WITH_ASSUMPTIONS = "determinate_with_assumptions",
|
|
74
|
+
INDETERMINATE = "indeterminate",
|
|
75
|
+
UNAVAILABLE = "unavailable",
|
|
76
|
+
INELIGIBLE = "ineligible"
|
|
77
|
+
}
|
|
78
|
+
export declare enum DiagnosticSeverity {
|
|
79
|
+
INFO = "info",
|
|
80
|
+
WARNING = "warning",
|
|
81
|
+
ERROR = "error"
|
|
82
|
+
}
|
|
83
|
+
export interface Diagnostic {
|
|
84
|
+
code: string;
|
|
85
|
+
severity: DiagnosticSeverity;
|
|
86
|
+
message: string;
|
|
87
|
+
path?: string;
|
|
88
|
+
legalReference?: string;
|
|
89
|
+
}
|
|
90
|
+
export interface CompensationInput {
|
|
91
|
+
/** Compensation eligible to support regular IRA contributions. */
|
|
92
|
+
iraCompensation?: Money;
|
|
93
|
+
/** W-2 wages for general plan-compensation defaults. */
|
|
94
|
+
w2Compensation?: Money;
|
|
95
|
+
/** Net earnings after the deductible half of self-employment tax. */
|
|
96
|
+
selfEmploymentNetEarnings?: Money;
|
|
97
|
+
}
|
|
98
|
+
export interface MagiInput {
|
|
99
|
+
/** Modified AGI used for direct Roth IRA contribution eligibility. */
|
|
100
|
+
rothIra?: Money;
|
|
101
|
+
/** Modified AGI used for the traditional IRA deduction phase-out. */
|
|
102
|
+
traditionalIraDeduction?: Money;
|
|
103
|
+
/** Pre-conversion MAGI used only for pre-2010 Roth-conversion eligibility. */
|
|
104
|
+
rothConversion?: Money;
|
|
105
|
+
}
|
|
106
|
+
export interface PersonInput {
|
|
107
|
+
id: string;
|
|
108
|
+
role?: PersonRole;
|
|
109
|
+
birthDate?: string;
|
|
110
|
+
birthYear?: number;
|
|
111
|
+
compensation?: CompensationInput;
|
|
112
|
+
magi?: MagiInput;
|
|
113
|
+
coveredByEmployerRetirementPlan?: boolean;
|
|
114
|
+
/** Used by the MFS IRA rules. Defaults to true for MFS. */
|
|
115
|
+
livedWithSpouseDuringYear?: boolean;
|
|
116
|
+
/** Prior-year IRC 3121(a) wages, keyed by common-law employer ID. */
|
|
117
|
+
priorYearFicaWagesByEmployer?: Record<string, Money>;
|
|
118
|
+
/** Accumulated nondeductible basis in all traditional/SEP/SIMPLE IRAs. */
|
|
119
|
+
traditionalSepSimpleIraBasis?: Money;
|
|
120
|
+
/** December 31 value of all traditional/SEP/SIMPLE IRAs. */
|
|
121
|
+
yearEndTraditionalSepSimpleIraValue?: Money;
|
|
122
|
+
/** Other current-year distributions included in the Form 8606 denominator. */
|
|
123
|
+
otherTraditionalSepSimpleIraDistributions?: Money;
|
|
124
|
+
}
|
|
125
|
+
export interface ExistingContributionInput {
|
|
126
|
+
employeePreTaxDeferral?: Money;
|
|
127
|
+
employeeRothDeferral?: Money;
|
|
128
|
+
employeePreTaxCatchUp?: Money;
|
|
129
|
+
employeeRothCatchUp?: Money;
|
|
130
|
+
employeeAfterTax?: Money;
|
|
131
|
+
employerPreTax?: Money;
|
|
132
|
+
employerRoth?: Money;
|
|
133
|
+
deductibleIra?: Money;
|
|
134
|
+
nondeductibleIra?: Money;
|
|
135
|
+
rothIra?: Money;
|
|
136
|
+
special403bCatchUp?: Money;
|
|
137
|
+
special457CatchUp?: Money;
|
|
138
|
+
}
|
|
139
|
+
export interface Special403bCatchUpInput {
|
|
140
|
+
eligible?: boolean;
|
|
141
|
+
yearsOfService: number;
|
|
142
|
+
priorElectiveDeferrals: Money;
|
|
143
|
+
priorSpecialCatchUpUsed: Money;
|
|
144
|
+
}
|
|
145
|
+
export interface Section457SpecialCatchUpInput {
|
|
146
|
+
eligible: boolean;
|
|
147
|
+
/** Total unused regular 457(b) deferrals from prior eligible years. */
|
|
148
|
+
unusedDeferralsFromPriorYears: Money;
|
|
149
|
+
}
|
|
150
|
+
export interface PlanRulesInput {
|
|
151
|
+
/** Compensation recognized by this plan. */
|
|
152
|
+
planCompensation?: Money;
|
|
153
|
+
/** Compensation recognized by a 457(b) plan. */
|
|
154
|
+
includibleCompensation457?: Money;
|
|
155
|
+
/** Shared IRC 415(c) group; use the same ID for plans of one controlled employer. */
|
|
156
|
+
annualAdditionsGroupId?: string;
|
|
157
|
+
/** Optional lower employee limit imposed by the plan document. */
|
|
158
|
+
planDocumentEmployeeDeferralLimit?: Money;
|
|
159
|
+
/** Optional lower annual-additions limit imposed by the plan document. */
|
|
160
|
+
planDocumentAnnualAdditionsLimit?: Money;
|
|
161
|
+
permitsRothContributions?: boolean;
|
|
162
|
+
permitsRothCatchUp?: boolean;
|
|
163
|
+
permitsAfterTaxEmployeeContributions?: boolean;
|
|
164
|
+
permitsInPlanRothRollover?: boolean;
|
|
165
|
+
contributionPreference?: ContributionPreference;
|
|
166
|
+
/** Known employer contribution; preferred when supplied. */
|
|
167
|
+
expectedEmployerContribution?: Money;
|
|
168
|
+
/** Employer match dollars per employee-deferral dollar, e.g. 0.5. */
|
|
169
|
+
employerMatchRate?: number;
|
|
170
|
+
/** Fraction of compensation eligible for the match, e.g. 0.06. */
|
|
171
|
+
employerMatchCompensationFraction?: number;
|
|
172
|
+
/** Employer nonelective contribution as a fraction of compensation. */
|
|
173
|
+
employerNonelectiveRate?: number;
|
|
174
|
+
employerContributionTaxTreatment?: EmployerContributionTaxTreatment;
|
|
175
|
+
simpleEmployerContributionMethod?: SimpleEmployerContributionMethod;
|
|
176
|
+
simpleCustomEmployerContribution?: Money;
|
|
177
|
+
simpleEnhancedLimitEligible?: boolean;
|
|
178
|
+
/** Treat compensation as self-employment net earnings for the employer formula. */
|
|
179
|
+
isSelfEmployedOwner?: boolean;
|
|
180
|
+
netEarningsFromSelfEmploymentAfterHalfSETax?: Money;
|
|
181
|
+
special403bCatchUp?: Special403bCatchUpInput;
|
|
182
|
+
section457SpecialCatchUp?: Section457SpecialCatchUpInput;
|
|
183
|
+
/** Grandfathered SARSEP established before 1997. */
|
|
184
|
+
grandfatheredSarsep?: boolean;
|
|
185
|
+
/** Used to surface the statutory 2024+ additional SIMPLE nonelective amount. */
|
|
186
|
+
simpleAdditionalNonelectiveContribution?: Money;
|
|
187
|
+
}
|
|
188
|
+
export interface RetirementAccountInput {
|
|
189
|
+
id: string;
|
|
190
|
+
ownerId: string;
|
|
191
|
+
type: AccountType | string;
|
|
192
|
+
employerId?: string;
|
|
193
|
+
priority?: number;
|
|
194
|
+
planRules?: PlanRulesInput;
|
|
195
|
+
existingContributions?: ExistingContributionInput;
|
|
196
|
+
}
|
|
197
|
+
export interface RothConversionInput {
|
|
198
|
+
id: string;
|
|
199
|
+
ownerId: string;
|
|
200
|
+
type: ConversionType | string;
|
|
201
|
+
amount: Money;
|
|
202
|
+
/** Basis in the specific qualified-plan amount being converted. */
|
|
203
|
+
afterTaxBasisInConvertedAmount?: Money;
|
|
204
|
+
/** Overrides the person's aggregate IRA basis for a Form 8606 calculation. */
|
|
205
|
+
aggregateIraBasisOverride?: Money;
|
|
206
|
+
/** Overrides the person's December 31 aggregate IRA value. */
|
|
207
|
+
yearEndAggregateIraValueOverride?: Money;
|
|
208
|
+
/** Pre-2013 in-plan rollovers generally required an otherwise distributable amount. */
|
|
209
|
+
otherwiseDistributableAmount?: boolean;
|
|
210
|
+
sourceAccountId?: string;
|
|
211
|
+
}
|
|
212
|
+
export interface RetirementScenarioInput {
|
|
213
|
+
taxYear: number;
|
|
214
|
+
filingStatus: FilingStatus | string;
|
|
215
|
+
persons: PersonInput[];
|
|
216
|
+
accounts: RetirementAccountInput[];
|
|
217
|
+
conversions?: RothConversionInput[];
|
|
218
|
+
}
|
|
219
|
+
export interface ContributionComponents {
|
|
220
|
+
employeePreTaxDeferral: Money;
|
|
221
|
+
employeeRothDeferral: Money;
|
|
222
|
+
employeePreTaxCatchUp: Money;
|
|
223
|
+
employeeRothCatchUp: Money;
|
|
224
|
+
employeeAfterTax: Money;
|
|
225
|
+
employerPreTax: Money;
|
|
226
|
+
employerRoth: Money;
|
|
227
|
+
deductibleIra: Money;
|
|
228
|
+
nondeductibleIra: Money;
|
|
229
|
+
rothIra: Money;
|
|
230
|
+
special403bCatchUp: Money;
|
|
231
|
+
special457CatchUp: Money;
|
|
232
|
+
/** Known regular contribution whose tax classification cannot be resolved. */
|
|
233
|
+
unclassifiedIra: Money;
|
|
234
|
+
}
|
|
235
|
+
export interface FederalTaxEffects {
|
|
236
|
+
federalAgiReduction: Money;
|
|
237
|
+
federalAgiIncrease: Money;
|
|
238
|
+
federalTaxableIncomeReduction: Money;
|
|
239
|
+
formW2Box1WageReduction: Money;
|
|
240
|
+
ficaWageReduction: Money;
|
|
241
|
+
selfEmployedRetirementDeduction: Money;
|
|
242
|
+
nondeductibleContribution: Money;
|
|
243
|
+
afterTaxOrRothContribution: Money;
|
|
244
|
+
taxableRothConversion: Money;
|
|
245
|
+
notes: string[];
|
|
246
|
+
}
|
|
247
|
+
export interface SharedLimitUse {
|
|
248
|
+
id: string;
|
|
249
|
+
legalLimit: string;
|
|
250
|
+
limit: Money | null;
|
|
251
|
+
usedBeforeAccount: Money;
|
|
252
|
+
usedByAccount: Money;
|
|
253
|
+
remainingAfterAccount: Money | null;
|
|
254
|
+
}
|
|
255
|
+
export interface AccountCalculationResult {
|
|
256
|
+
accountId: string;
|
|
257
|
+
accountType: AccountType;
|
|
258
|
+
ownerId: string;
|
|
259
|
+
employerId?: string;
|
|
260
|
+
status: CalculationStatus;
|
|
261
|
+
/** Overall legal ceiling if a monetary contribution ceiling can be calculated. */
|
|
262
|
+
statutoryMaximumAnnualContribution: Money | null;
|
|
263
|
+
/** Maximum supported by the supplied plan capabilities and formulas. */
|
|
264
|
+
maximumAnnualContributionBasedOnInputs: Money | null;
|
|
265
|
+
maximumAdditionalContributionBasedOnInputs: Money | null;
|
|
266
|
+
existingAnnualContribution: Money;
|
|
267
|
+
contributionComponents: ContributionComponents;
|
|
268
|
+
/** Potential IRC 415(c) space that requires unknown plan/employer terms. */
|
|
269
|
+
planTermDependentCapacity: Money;
|
|
270
|
+
federalTaxEffects: FederalTaxEffects;
|
|
271
|
+
sharedLimits: SharedLimitUse[];
|
|
272
|
+
diagnostics: Diagnostic[];
|
|
273
|
+
}
|
|
274
|
+
export interface ConversionCalculationResult {
|
|
275
|
+
conversionId: string;
|
|
276
|
+
conversionType: ConversionType;
|
|
277
|
+
ownerId: string;
|
|
278
|
+
status: CalculationStatus;
|
|
279
|
+
grossConvertedAmount: Money;
|
|
280
|
+
taxableAmount: Money | null;
|
|
281
|
+
nontaxableBasisAmount: Money | null;
|
|
282
|
+
consumesAnnualContributionLimit: false;
|
|
283
|
+
federalTaxEffects: FederalTaxEffects;
|
|
284
|
+
diagnostics: Diagnostic[];
|
|
285
|
+
}
|
|
286
|
+
export interface ScenarioTotals {
|
|
287
|
+
maximumAnnualContributionBasedOnInputs: Money;
|
|
288
|
+
maximumAdditionalContributionBasedOnInputs: Money;
|
|
289
|
+
employeePreTaxContribution: Money;
|
|
290
|
+
employeeRothOrAfterTaxContribution: Money;
|
|
291
|
+
employerPreTaxContribution: Money;
|
|
292
|
+
employerRothContribution: Money;
|
|
293
|
+
deductibleIraContribution: Money;
|
|
294
|
+
nondeductibleIraContribution: Money;
|
|
295
|
+
federalAgiReduction: Money;
|
|
296
|
+
federalAgiIncrease: Money;
|
|
297
|
+
taxableRothConversions: Money;
|
|
298
|
+
}
|
|
299
|
+
export interface RetirementScenarioResult {
|
|
300
|
+
package: typeof PACKAGE_NAME;
|
|
301
|
+
engineVersion: typeof ENGINE_VERSION;
|
|
302
|
+
taxYear: number;
|
|
303
|
+
filingStatus: FilingStatus;
|
|
304
|
+
parameters: YearParameters;
|
|
305
|
+
accounts: AccountCalculationResult[];
|
|
306
|
+
conversions: ConversionCalculationResult[];
|
|
307
|
+
totals: ScenarioTotals;
|
|
308
|
+
diagnostics: Diagnostic[];
|
|
309
|
+
}
|
|
310
|
+
interface PhaseoutRange {
|
|
311
|
+
singleOrHeadOfHousehold?: [Money, Money];
|
|
312
|
+
marriedFilingJointlyOrQualifyingSurvivingSpouse?: [Money, Money];
|
|
313
|
+
marriedFilingSeparatelyLivingTogether?: [Money, Money];
|
|
314
|
+
marriedFilingJointly?: [Money, Money];
|
|
315
|
+
}
|
|
316
|
+
export interface YearParameters {
|
|
317
|
+
year: number;
|
|
318
|
+
ira: {
|
|
319
|
+
baseContributionLimit: Money;
|
|
320
|
+
age50CatchUp: Money;
|
|
321
|
+
compensationFraction: number;
|
|
322
|
+
universalEligibility: boolean;
|
|
323
|
+
nondeductibleContributionAvailable: boolean;
|
|
324
|
+
spousalIraAvailable: boolean;
|
|
325
|
+
nonworkingSpouseIndividualLimit: Money | null;
|
|
326
|
+
oneEarnerHouseholdCombinedLimit: Money | null;
|
|
327
|
+
traditionalContributionAge70HalfRestriction: boolean;
|
|
328
|
+
rothAvailable: boolean;
|
|
329
|
+
};
|
|
330
|
+
electiveDeferral402g: Money | null;
|
|
331
|
+
generalAge50CatchUp: Money;
|
|
332
|
+
age60To63CatchUp: Money | null;
|
|
333
|
+
rothCatchUpPriorYearFicaWageThreshold: Money | null;
|
|
334
|
+
annualAdditions415c: Money | null;
|
|
335
|
+
annualAdditionsCompensationFraction: number | null;
|
|
336
|
+
annualCompensation401a17: Money | null;
|
|
337
|
+
sep: {
|
|
338
|
+
available: boolean;
|
|
339
|
+
maximumEmployerContributionRate: number;
|
|
340
|
+
selfEmployedEquivalentRate: number;
|
|
341
|
+
minimumEligibleCompensation: Money | null;
|
|
342
|
+
newSarsepMayBeEstablished: boolean;
|
|
343
|
+
grandfatheredSarsepMayOperate: boolean;
|
|
344
|
+
rothSepAvailable: boolean;
|
|
345
|
+
};
|
|
346
|
+
simple: {
|
|
347
|
+
available: boolean;
|
|
348
|
+
salaryReductionLimit: Money | null;
|
|
349
|
+
generalAge50CatchUp: Money;
|
|
350
|
+
age60To63CatchUp: Money | null;
|
|
351
|
+
certainPlanEnhancedSalaryReductionLimit: Money | null;
|
|
352
|
+
certainPlanAge50CatchUp: Money | null;
|
|
353
|
+
additionalNonelectiveContributionCap: Money | null;
|
|
354
|
+
};
|
|
355
|
+
section457b: {
|
|
356
|
+
available: boolean;
|
|
357
|
+
baseDeferralLimit: Money | null;
|
|
358
|
+
includibleCompensationFraction: number | null;
|
|
359
|
+
specialLastThreeYearsMaximum: Money | null;
|
|
360
|
+
governmentalAge50CatchUp: Money;
|
|
361
|
+
governmentalAge60To63CatchUp: Money | null;
|
|
362
|
+
designatedRothAvailableForGovernmentalPlans: boolean;
|
|
363
|
+
};
|
|
364
|
+
starterDeferralOnly: {
|
|
365
|
+
available: boolean;
|
|
366
|
+
baseDeferralLimit: Money | null;
|
|
367
|
+
age50CatchUp: Money;
|
|
368
|
+
};
|
|
369
|
+
availability: Record<string, boolean>;
|
|
370
|
+
phaseouts: {
|
|
371
|
+
traditionalIraCovered: PhaseoutRange | null;
|
|
372
|
+
traditionalIraSpouseCovered: PhaseoutRange | null;
|
|
373
|
+
rothIra: PhaseoutRange | null;
|
|
374
|
+
};
|
|
375
|
+
}
|
|
376
|
+
export declare class RetirementParameterError extends Error {
|
|
377
|
+
readonly code: string;
|
|
378
|
+
constructor(code: string, message: string);
|
|
379
|
+
}
|
|
380
|
+
export declare class UnsupportedTaxYearError extends RetirementParameterError {
|
|
381
|
+
constructor(year: number, minimum: number, maximum: number);
|
|
382
|
+
}
|
|
383
|
+
export declare function calculateRetirementScenario(input: RetirementScenarioInput): RetirementScenarioResult;
|
|
384
|
+
export declare class PersonBuilder {
|
|
385
|
+
private readonly value;
|
|
386
|
+
constructor(id: string);
|
|
387
|
+
asTaxpayer(): this;
|
|
388
|
+
asSpouse(): this;
|
|
389
|
+
role(role: PersonRole): this;
|
|
390
|
+
bornOn(birthDate: string): this;
|
|
391
|
+
bornIn(birthYear: number): this;
|
|
392
|
+
iraCompensation(amount: Money): this;
|
|
393
|
+
w2Compensation(amount: Money): this;
|
|
394
|
+
selfEmploymentNetEarnings(amount: Money): this;
|
|
395
|
+
rothIraMagi(amount: Money): this;
|
|
396
|
+
traditionalIraDeductionMagi(amount: Money): this;
|
|
397
|
+
rothConversionMagi(amount: Money): this;
|
|
398
|
+
coveredByEmployerPlan(covered?: boolean): this;
|
|
399
|
+
livedWithSpouseDuringYear(livedTogether?: boolean): this;
|
|
400
|
+
priorYearFicaWages(employerId: string, amount: Money): this;
|
|
401
|
+
aggregateTraditionalSepSimpleIraBasis(amount: Money): this;
|
|
402
|
+
yearEndTraditionalSepSimpleIraValue(amount: Money): this;
|
|
403
|
+
otherTraditionalSepSimpleIraDistributions(amount: Money): this;
|
|
404
|
+
build(): PersonInput;
|
|
405
|
+
}
|
|
406
|
+
export declare class RetirementAccountBuilder {
|
|
407
|
+
private readonly value;
|
|
408
|
+
constructor(id: string, ownerId: string, type: AccountType | string);
|
|
409
|
+
owner(ownerId: string): this;
|
|
410
|
+
accountType(type: AccountType | string): this;
|
|
411
|
+
employer(employerId: string): this;
|
|
412
|
+
priority(priority: number): this;
|
|
413
|
+
planCompensation(amount: Money): this;
|
|
414
|
+
includible457Compensation(amount: Money): this;
|
|
415
|
+
annualAdditionsGroup(groupId: string): this;
|
|
416
|
+
planDocumentEmployeeLimit(amount: Money): this;
|
|
417
|
+
planDocumentAnnualAdditionsLimit(amount: Money): this;
|
|
418
|
+
permitsRothContributions(permits?: boolean): this;
|
|
419
|
+
permitsRothCatchUp(permits?: boolean): this;
|
|
420
|
+
permitsAfterTaxContributions(permits?: boolean): this;
|
|
421
|
+
permitsInPlanRothRollover(permits?: boolean): this;
|
|
422
|
+
contributionPreference(preference: ContributionPreference): this;
|
|
423
|
+
expectedEmployerContribution(amount: Money, taxTreatment?: EmployerContributionTaxTreatment): this;
|
|
424
|
+
employerMatch(matchRate: number, compensationFraction: number): this;
|
|
425
|
+
employerNonelective(rateValue: number): this;
|
|
426
|
+
employerContributionTaxTreatment(treatment: EmployerContributionTaxTreatment): this;
|
|
427
|
+
simpleEmployerMethod(method: SimpleEmployerContributionMethod, customAmount?: Money): this;
|
|
428
|
+
simpleEnhancedLimitEligible(eligible?: boolean): this;
|
|
429
|
+
simpleAdditionalNonelectiveContribution(amount: Money): this;
|
|
430
|
+
selfEmployedOwner(netEarningsAfterHalfSETax: Money): this;
|
|
431
|
+
special403bCatchUp(input: Special403bCatchUpInput): this;
|
|
432
|
+
special457CatchUp(input: Section457SpecialCatchUpInput): this;
|
|
433
|
+
grandfatheredSarsep(grandfathered?: boolean): this;
|
|
434
|
+
existing(contributions: ExistingContributionInput): this;
|
|
435
|
+
build(): RetirementAccountInput;
|
|
436
|
+
}
|
|
437
|
+
export declare class RothConversionBuilder {
|
|
438
|
+
private readonly value;
|
|
439
|
+
constructor(id: string, ownerId: string, type: ConversionType | string, amount: Money);
|
|
440
|
+
afterTaxBasis(amount: Money): this;
|
|
441
|
+
aggregateIraBasis(amount: Money): this;
|
|
442
|
+
yearEndAggregateIraValue(amount: Money): this;
|
|
443
|
+
otherwiseDistributable(eligible?: boolean): this;
|
|
444
|
+
sourceAccount(accountId: string): this;
|
|
445
|
+
build(): RothConversionInput;
|
|
446
|
+
}
|
|
447
|
+
export declare class RetirementScenario {
|
|
448
|
+
private readonly input;
|
|
449
|
+
constructor(input: RetirementScenarioInput);
|
|
450
|
+
calculate(): RetirementScenarioResult;
|
|
451
|
+
toInput(): RetirementScenarioInput;
|
|
452
|
+
}
|
|
453
|
+
export declare class RetirementScenarioBuilder {
|
|
454
|
+
private readonly value;
|
|
455
|
+
static forTaxYear(taxYear: number): RetirementScenarioBuilder;
|
|
456
|
+
constructor(taxYear: number);
|
|
457
|
+
filingStatus(status: FilingStatus | string): this;
|
|
458
|
+
addPerson(person: PersonInput | PersonBuilder): this;
|
|
459
|
+
taxpayer(id: string, configure?: (builder: PersonBuilder) => void): this;
|
|
460
|
+
spouse(id: string, configure?: (builder: PersonBuilder) => void): this;
|
|
461
|
+
addAccount(account: RetirementAccountInput | RetirementAccountBuilder): this;
|
|
462
|
+
account(id: string, ownerId: string, type: AccountType | string, configure?: (builder: RetirementAccountBuilder) => void): this;
|
|
463
|
+
addConversion(conversion: RothConversionInput | RothConversionBuilder): this;
|
|
464
|
+
conversion(id: string, ownerId: string, type: ConversionType | string, amount: Money, configure?: (builder: RothConversionBuilder) => void): this;
|
|
465
|
+
build(): RetirementScenario;
|
|
466
|
+
calculate(): RetirementScenarioResult;
|
|
467
|
+
toInput(): RetirementScenarioInput;
|
|
468
|
+
}
|
|
469
|
+
export declare class USTaxAdvantagedParams {
|
|
470
|
+
static forTaxYear(taxYear: number): RetirementScenarioBuilder;
|
|
471
|
+
static calculate(input: RetirementScenarioInput): RetirementScenarioResult;
|
|
472
|
+
static parametersForYear(taxYear: number): YearParameters;
|
|
473
|
+
static supportedTaxYears(): {
|
|
474
|
+
minimum: number;
|
|
475
|
+
maximum: number;
|
|
476
|
+
};
|
|
477
|
+
static generatedThroughTaxYear(): number;
|
|
478
|
+
static normalizeFilingStatus(status: FilingStatus | string): FilingStatus;
|
|
479
|
+
static normalizeAccountType(type: AccountType | string): AccountType;
|
|
480
|
+
static sourceMetadata(): Array<Record<string, string>>;
|
|
481
|
+
}
|
|
482
|
+
export default USTaxAdvantagedParams;
|