@casomoltd/nhs-pay 0.30.0 → 0.32.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/README.md +71 -252
- package/dist/bands.d.ts +9 -1
- package/dist/bands.js +20 -0
- package/dist/bands.js.map +1 -1
- package/dist/document-source.d.ts +32 -7
- package/dist/document-source.js +32 -8
- package/dist/document-source.js.map +1 -1
- package/dist/errors.d.ts +57 -11
- package/dist/errors.js +85 -28
- package/dist/errors.js.map +1 -1
- package/dist/factor-basis.d.ts +23 -3
- package/dist/factor-basis.js +40 -28
- package/dist/factor-basis.js.map +1 -1
- package/dist/index.d.ts +16 -14
- package/dist/index.js +9 -8
- package/dist/index.js.map +1 -1
- package/dist/member/benefits.js +25 -13
- package/dist/member/benefits.js.map +1 -1
- package/dist/member/index.d.ts +1 -1
- package/dist/member/input-period.d.ts +4 -4
- package/dist/member/input-period.js +11 -9
- package/dist/member/input-period.js.map +1 -1
- package/dist/member/service.d.ts +4 -0
- package/dist/member/service.js +9 -3
- package/dist/member/service.js.map +1 -1
- package/dist/member/types.d.ts +81 -49
- package/dist/member/types.js.map +1 -1
- package/dist/member/valuation.d.ts +10 -8
- package/dist/member/valuation.js +14 -21
- package/dist/member/valuation.js.map +1 -1
- package/dist/pay-path.d.ts +21 -25
- package/dist/pay-path.js +85 -67
- package/dist/pay-path.js.map +1 -1
- package/dist/pension/ages.d.ts +6 -4
- package/dist/pension/ages.js +6 -4
- package/dist/pension/ages.js.map +1 -1
- package/dist/pension/curve.d.ts +2 -1
- package/dist/pension/curve.js +15 -7
- package/dist/pension/curve.js.map +1 -1
- package/dist/pension/history.d.ts +18 -3
- package/dist/pension/history.js +12 -5
- package/dist/pension/history.js.map +1 -1
- package/dist/pension/ledger.d.ts +15 -9
- package/dist/pension/ledger.js +95 -59
- package/dist/pension/ledger.js.map +1 -1
- package/dist/pension/money.d.ts +2 -0
- package/dist/pension/money.js +4 -0
- package/dist/pension/money.js.map +1 -1
- package/dist/pension/prices.d.ts +11 -2
- package/dist/pension/prices.js +35 -14
- package/dist/pension/prices.js.map +1 -1
- package/dist/pension/scheme-year.d.ts +59 -0
- package/dist/pension/scheme-year.js +80 -0
- package/dist/pension/scheme-year.js.map +1 -0
- package/dist/pension/seed.d.ts +66 -50
- package/dist/pension/seed.js +111 -65
- package/dist/pension/seed.js.map +1 -1
- package/dist/pension/uplift.d.ts +38 -54
- package/dist/pension/uplift.js +38 -68
- package/dist/pension/uplift.js.map +1 -1
- package/dist/pension-projection.js +30 -22
- package/dist/pension-projection.js.map +1 -1
- package/dist/post.d.ts +1 -10
- package/dist/post.js +1 -12
- package/dist/post.js.map +1 -1
- package/dist/revaluation.d.ts +56 -41
- package/dist/revaluation.js +76 -62
- package/dist/revaluation.js.map +1 -1
- package/dist/scale-point.d.ts +6 -0
- package/dist/sections/final-salary.d.ts +3 -8
- package/dist/sections/final-salary.js +6 -10
- package/dist/sections/final-salary.js.map +1 -1
- package/dist/sections/section-2015.d.ts +3 -4
- package/dist/sections/section-2015.js +1 -1
- package/dist/sections/section-2015.js.map +1 -1
- package/dist/sources.d.ts +14 -0
- package/dist/sources.js +24 -0
- package/dist/sources.js.map +1 -1
- package/dist/take-home.d.ts +4 -20
- package/dist/take-home.js +3 -23
- package/dist/take-home.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -13,14 +13,14 @@ export { DENTAL_GRADES, DENTAL_GRADE_IDS, DENTAL_PAY_YEARS, getDentalScales, } f
|
|
|
13
13
|
export { ADDITIONAL_PENSION_LIMIT, ADDITIONAL_PENSION_PAYMENTS, ADDITIONAL_PENSION_UNIT, additionalPensionCost, additionalPensionToBuy, } from './additional-pension.js';
|
|
14
14
|
export { ADDITIONAL_PENSION_COVERS } from './gad/additional-pension-table.js';
|
|
15
15
|
// ── Errors ───────────────────────────────────────
|
|
16
|
-
export { ADDITIONAL_PENSION_REFUSALS, AdditionalPensionUnavailable, AmbiguousScalePoint, AwardUnavailable, BenefitNotModelled, NOT_MODELLED, PayPathUnavailable, PensionTiersUnavailable, RetirementFactorOutOfRange, ScaleUnavailable, } from './errors.js';
|
|
16
|
+
export { ADDITIONAL_PENSION_REFUSALS, AdditionalPensionUnavailable, AmbiguousScalePoint, AwardUnavailable, BeforeStatement, BenefitNotModelled, isBeforeStatement, NOT_MODELLED, PayPathUnavailable, PensionTiersUnavailable, RetirementFactorOutOfRange, ScaleUnavailable, STATEMENT_READS, } from './errors.js';
|
|
17
17
|
// ── Cited documents ──────────────────────────────
|
|
18
18
|
// Every published document the library reads a figure from. A consumer
|
|
19
19
|
// citing "where these figures come from" reads the record rather than
|
|
20
20
|
// keeping its own copy of the url.
|
|
21
|
-
export { DocumentSource } from './document-source.js';
|
|
21
|
+
export { DocumentSource, SOURCE_CURRENCIES } from './document-source.js';
|
|
22
22
|
export { isoDate, isoMonth, monthOf, firstOfMonth, monthToDate, isoToDate, isoDateOf, } from './iso-date.js';
|
|
23
|
-
export { AFC_ENGLAND_SCALES_2025, AFC_ENGLAND_SCALES_2026, AFC_NI_2025, AFC_SCOTLAND, AFC_SCOTLAND_36_HOUR_WEEK, AFC_W_01_2026, AFC_W_02_2025, AFC_W_02_2026, AP_FACTSHEET_2026, DHSC_PETITION_779519, FA2004_SCH36_PARA_23ZB, SPPA_NHS_CIRCULAR_2025_09, HSC_TC8_05_2025, MD_W_01_2025, MD_W_01_2026, PC_MD_1_2026_R2, PCS_DD_2025_01, PCS_DD_2025_01_ADDENDUM, PCS_DD_2026_01, PCS_DD_2026_02, } from './sources.js';
|
|
23
|
+
export { AFC_ENGLAND_SCALES_2025, AFC_ENGLAND_SCALES_2026, AFC_NI_2025, AFC_SCOTLAND, AFC_SCOTLAND_36_HOUR_WEEK, AFC_W_01_2026, AFC_W_02_2025, AFC_W_02_2026, AP_FACTSHEET_2026, DHSC_PETITION_779519, FA2004_SCH36_PARA_23ZB, SPPA_NHS_CIRCULAR_2025_09, HSC_TC8_05_2025, MD_W_01_2025, MD_W_01_2026, NHSBSA_ESTIMATE_GUIDE, NHSBSA_STATEMENT_GUIDE, PC_MD_1_2026_R2, PCS_DD_2025_01, PCS_DD_2025_01_ADDENDUM, PCS_DD_2026_01, PCS_DD_2026_02, } from './sources.js';
|
|
24
24
|
// ── Pay awards ───────────────────────────────────
|
|
25
25
|
export { AWARD_FAMILIES, afcAward, anyNationSettled, awardFamilyFor, awardsFor, changesFor, } from './award.js';
|
|
26
26
|
// ── Pay rounds ───────────────────────────────────
|
|
@@ -29,7 +29,7 @@ export { AWARD_FAMILIES, afcAward, anyNationSettled, awardFamilyFor, awardsFor,
|
|
|
29
29
|
export { payRound } from './pay-round.js';
|
|
30
30
|
// ── AfC allowances ───────────────────────────────
|
|
31
31
|
export { SESSION_ALLOWANCES, afcSessionAllowances, sessionAllowance, } from './allowances.js';
|
|
32
|
-
export { ACTIVE_REVAL_BONUS_PCT, IN_SERVICE_REVALUATION, revaluationFor, } from './revaluation.js';
|
|
32
|
+
export { ACTIVE_REVAL_BONUS_PCT, activeRatePct, IN_SERVICE_REVALUATION, revaluationFor, } from './revaluation.js';
|
|
33
33
|
// ── Pay path ───────────────────────────────────────
|
|
34
34
|
// GAD's promotional curve is the same for everybody, so it is public;
|
|
35
35
|
// a member's pay path is built inside and reached through the member's
|
|
@@ -62,8 +62,9 @@ export { firstJoinedOf, LEGACY_PENSION_AGES, mayDrawOn, memberMinimumPensionAge,
|
|
|
62
62
|
// ── The pension ledger ───────────────────────────────
|
|
63
63
|
// A consumer reads the ledger only when it wants the workings.
|
|
64
64
|
export { createPrices, createPublishedPrices, inflationFactor, TODAYS_MONEY_CPI, } from './pension/prices.js';
|
|
65
|
-
export {
|
|
66
|
-
export { schemeYearClosedBy, schemeYearEndDate, schemeYearEndFor, schemeYearStartDate,
|
|
65
|
+
export { deferredRatePct, MEMBER_PHASES, upliftsFor, } from './pension/uplift.js';
|
|
66
|
+
export { isSchemeYearEnd, schemeYearAfter, schemeYearBefore, schemeYearClosedBy, schemeYearEnd, schemeYearEndDate, schemeYearEndFor, schemeYearStartDate, } from './pension/scheme-year.js';
|
|
67
|
+
export { SEED_BASES, seedFromJoinDate, seedFromStatement, } from './pension/seed.js';
|
|
67
68
|
export { buildLedger } from './pension/ledger.js';
|
|
68
69
|
// ── HCAS ─────────────────────────────────────────
|
|
69
70
|
export { HCAS_ZONE_IDS, calculateHcasSupplement, grossSalary, isHcasZoneId, } from './hcas.js';
|
|
@@ -72,9 +73,9 @@ export { getHcasPcts, getHcasZone, } from './hcas-pcts.js';
|
|
|
72
73
|
// ── Regions ──────────────────────────────────────
|
|
73
74
|
export { AFC_REGIONS, ZONE_TO_REGION, afcRegionToHcasZone, afcRegionToNation, isAfcRegionId, isNation, resolveRegion, } from './regions.js';
|
|
74
75
|
// ── Bands ────────────────────────────────────────
|
|
75
|
-
export { AFC_CURRENT_YEAR, AFC_PREVIOUS_YEAR, getAfcScales, } from './bands.js';
|
|
76
|
+
export { AFC_CURRENT_YEAR, AFC_PREVIOUS_YEAR, afcPointOf, getAfcScales, } from './bands.js';
|
|
76
77
|
// ── Take-home ────────────────────────────────────
|
|
77
|
-
export {
|
|
78
|
+
export { nhsTakeHome } from './take-home.js';
|
|
78
79
|
// ── Working week ──────────────────────────────
|
|
79
80
|
export { afcWeekInForce, afcWeeklyHours, hoursPerYear } from './working-week.js';
|
|
80
81
|
// ── Format ───────────────────────────────────────
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AAEzC,OAAO,EACL,SAAS,EACT,YAAY,EACZ,cAAc,EACd,aAAa,EACb,UAAU,EACV,kBAAkB,EAClB,sBAAsB,EACtB,WAAW,EACX,UAAU,EACV,iBAAiB,EACjB,eAAe,GAChB,MAAM,aAAa,CAAC;AASrB,oDAAoD;AACpD,OAAO,EACL,YAAY,EACZ,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,GAChB,MAAM,cAAc,CAAC;AAUtB,oDAAoD;AACpD,OAAO,EAAC,IAAI,EAAE,cAAc,EAAC,MAAM,WAAW,CAAC;AAU/C,OAAO,EAAC,WAAW,EAAE,cAAc,EAAE,eAAe,EAAC,MAAM,eAAe,CAAC;AAS3E,oDAAoD;AACpD,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAK7B,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,GAChB,MAAM,oBAAoB,CAAC;AAK5B,oDAAoD;AACpD,OAAO,EACL,wBAAwB,EACxB,2BAA2B,EAC3B,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,yBAAyB,CAAC;AAKjC,OAAO,EAAC,yBAAyB,EAAC,MAAM,mCAAmC,CAAC;AAK5E,oDAAoD;AACpD,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC5B,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,YAAY,EACZ,kBAAkB,EAClB,uBAAuB,EACvB,0BAA0B,EAC1B,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AAEzC,OAAO,EACL,SAAS,EACT,YAAY,EACZ,cAAc,EACd,aAAa,EACb,UAAU,EACV,kBAAkB,EAClB,sBAAsB,EACtB,WAAW,EACX,UAAU,EACV,iBAAiB,EACjB,eAAe,GAChB,MAAM,aAAa,CAAC;AASrB,oDAAoD;AACpD,OAAO,EACL,YAAY,EACZ,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,iBAA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V,YAAY,GACb,MAAM,YAAY,CAAC;AAMpB,oDAAoD;AACpD,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAE3C,iDAAiD;AACjD,OAAO,EAAC,cAAc,EAAE,cAAc,EAAE,YAAY,EAAC,MAAM,mBAAmB,CAAC;AAG/E,oDAAoD;AACpD,OAAO,EACL,QAAQ,EACR,MAAM,EACN,SAAS,EACT,SAAS,EACT,gBAAgB,EAChB,SAAS,EACT,gBAAgB,EAChB,SAAS,GACV,MAAM,aAAa,CAAC;AAErB,oDAAoD;AACpD,mDAAmD;AACnD,qDAAqD;AACrD,OAAO,EACL,WAAW,EACX,SAAS,EACT,OAAO,EACP,WAAW,EACX,WAAW,EACX,WAAW,EACX,YAAY,EACZ,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,sBAAsB,CAAC"}
|
package/dist/member/benefits.js
CHANGED
|
@@ -31,10 +31,14 @@ import { buildPayPath } from '../pay-path.js';
|
|
|
31
31
|
import { npaDate } from '../dates.js';
|
|
32
32
|
import { sumMoney } from '../pension/money.js';
|
|
33
33
|
import { createPrices, createPublishedPrices, TODAYS_MONEY_CPI, } from '../pension/prices.js';
|
|
34
|
-
import {
|
|
34
|
+
import { schemeYearEndDate } from '../pension/scheme-year.js';
|
|
35
|
+
import { answersFrom } from '../pension/seed.js';
|
|
36
|
+
import { electionsFor, periodsOf, refuseElectionMismatch, REMEDY, servicePeriods, } from './service.js';
|
|
35
37
|
import { careerAward, finalSalaryValued, holdings, legacyAward, refuseLeavingAfterDeclared, RULES, section2015, seed2015, walksWindow, windowSeed, } from './valuation.js';
|
|
36
38
|
import { inputPeriods } from './input-period.js';
|
|
37
39
|
import { PAST_YEARS, SECTIONS } from './types.js';
|
|
40
|
+
/** The call every refusal of `at()`'s choices names. */
|
|
41
|
+
const ASKED = 'at';
|
|
38
42
|
/** The price series each reading of the past is priced on. Total over
|
|
39
43
|
* `PastYears`, so a new reading fails the build until it has one. */
|
|
40
44
|
const CASH_SERIES = {
|
|
@@ -76,8 +80,10 @@ export function memberBenefits(member, assumptions, today) {
|
|
|
76
80
|
return {
|
|
77
81
|
periods: periodsOf(held),
|
|
78
82
|
remedy,
|
|
83
|
+
elections: electionsFor(remedy),
|
|
79
84
|
legacy: legacy === null ? null : legacyOf(legacy.section),
|
|
80
85
|
payPath: built.payPath,
|
|
86
|
+
statementAnswersFrom: answersFrom(seed2015(built)),
|
|
81
87
|
minimumPensionAgeOn: (drawing) => memberMinimumPensionAge(history, drawing),
|
|
82
88
|
mayDrawOn: (drawing) => mayDrawOn(history, drawing),
|
|
83
89
|
now: () => holdings(built),
|
|
@@ -95,18 +101,18 @@ function position(b, choices) {
|
|
|
95
101
|
const own = careerAward(b, {
|
|
96
102
|
section: SECTIONS.s2015,
|
|
97
103
|
window: b.ordinary2015,
|
|
98
|
-
|
|
104
|
+
seed: seed2015(b),
|
|
99
105
|
}, dates);
|
|
100
106
|
awards.push(own.award);
|
|
101
|
-
const pension = sumMoney(awards.map((a) => a.pension), dates.drawing);
|
|
102
|
-
const automaticLumpSum = sumMoney(awards.map((a) => a.automaticLumpSum), dates.drawing);
|
|
107
|
+
const pension = sumMoney(awards.map((a) => a.pension.after), dates.drawing);
|
|
108
|
+
const automaticLumpSum = sumMoney(awards.map((a) => a.automaticLumpSum.after), dates.drawing);
|
|
103
109
|
return {
|
|
104
110
|
choices,
|
|
105
111
|
awards,
|
|
106
112
|
crystallised: { pension, automaticLumpSum },
|
|
107
113
|
cash: cashAt(pension, automaticLumpSum, choices.cash, nhsCommutationLimits(b.cashPrices)),
|
|
108
114
|
prices: b.cashPrices,
|
|
109
|
-
|
|
115
|
+
section2015: section2015(b, own, dates),
|
|
110
116
|
};
|
|
111
117
|
}
|
|
112
118
|
/** The legacy section's awards: on the legacy basis every legacy period
|
|
@@ -123,7 +129,7 @@ function legacyAwards(b, legacy, choices, dates) {
|
|
|
123
129
|
return [
|
|
124
130
|
finalSalary,
|
|
125
131
|
careerAward(b, {
|
|
126
|
-
section: legacy.section, window,
|
|
132
|
+
section: legacy.section, window, seed: windowSeed(window),
|
|
127
133
|
}, dates).award,
|
|
128
134
|
];
|
|
129
135
|
}
|
|
@@ -131,9 +137,8 @@ function legacyAwards(b, legacy, choices, dates) {
|
|
|
131
137
|
function refuseUnmodelled(member, remedy, legacy) {
|
|
132
138
|
// Deferred until the split of a pre-rollback balance is read:
|
|
133
139
|
// https://github.com/casomoltd/nhs-pay/issues/20
|
|
134
|
-
if (remedy && member
|
|
135
|
-
|
|
136
|
-
throw new BenefitNotModelled(NOT_MODELLED.statementBeforeRollback, 'a statement from before rollback on 1 October 2023, which '
|
|
140
|
+
if (remedy && statementBeforeRollback(member)) {
|
|
141
|
+
throw new BenefitNotModelled(NOT_MODELLED.statementBeforeRollback, `a statement from before rollback on ${REMEDY.rollback}, which `
|
|
137
142
|
+ 'counts the remedy years in the 2015 Section');
|
|
138
143
|
}
|
|
139
144
|
// Deferred until part-time final-salary membership is modelled:
|
|
@@ -143,6 +148,13 @@ function refuseUnmodelled(member, remedy, legacy) {
|
|
|
143
148
|
+ 'part-time membership pro rata on whole-time final pay');
|
|
144
149
|
}
|
|
145
150
|
}
|
|
151
|
+
/** Whether the member's statement closes before rollback, and so still
|
|
152
|
+
* counts the remedy years in the 2015 Section. */
|
|
153
|
+
function statementBeforeRollback(member) {
|
|
154
|
+
return member.statement !== null
|
|
155
|
+
&& schemeYearEndDate(member.statement.yearEnd)
|
|
156
|
+
< isoToDate(REMEDY.rollback);
|
|
157
|
+
}
|
|
146
158
|
/** A legacy section's rules, as `MemberBenefits.legacy` states them. */
|
|
147
159
|
function legacyOf(section) {
|
|
148
160
|
const rules = RULES[section];
|
|
@@ -159,15 +171,15 @@ function checked(b, choices) {
|
|
|
159
171
|
const leaving = isoToDate(choices.leaving);
|
|
160
172
|
const drawing = isoToDate(choices.drawing);
|
|
161
173
|
if (drawing < leaving) {
|
|
162
|
-
throw new RangeError(
|
|
174
|
+
throw new RangeError(`${ASKED}: drawn before leaving`);
|
|
163
175
|
}
|
|
164
|
-
refuseLeavingAfterDeclared(
|
|
165
|
-
refuseElectionMismatch(
|
|
176
|
+
refuseLeavingAfterDeclared(ASKED, b, leaving);
|
|
177
|
+
refuseElectionMismatch(ASKED, b.remedy, choices.remedy.kind);
|
|
166
178
|
// The scheme pays nothing before the minimum pension age outside ill
|
|
167
179
|
// health, so a figure there would be one no member could draw.
|
|
168
180
|
const { mayDraw, minimumAge } = drawingTest(b.history, choices.drawing);
|
|
169
181
|
if (!mayDraw) {
|
|
170
|
-
throw new RangeError(
|
|
182
|
+
throw new RangeError(`${ASKED}: drawn before the minimum pension age, ${minimumAge}`);
|
|
171
183
|
}
|
|
172
184
|
return { leaving, drawing };
|
|
173
185
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"benefits.js","sourceRoot":"","sources":["../../src/member/benefits.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAC,MAAM,EAAE,oBAAoB,EAAC,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAC,kBAAkB,EAAE,SAAS,EAAE,YAAY,EAAC,MAAM,cAAc,CAAC;AAEzE,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACzC,OAAO,EACL,WAAW,EAAE,aAAa,EAAE,SAAS,EAAE,uBAAuB,EAC9D,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAC,OAAO,EAAC,MAAM,aAAa,CAAC;AACpC,OAAO,EAAC,QAAQ,EAAC,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EACL,YAAY,EAAE,qBAAqB,EAAE,gBAAgB,GACtD,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,SAAS,EAAE,sBAAsB,EAAE,MAAM,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"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AAC;IAC3C,MAAM,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC3C,IAAI,OAAO,GAAG,OAAO,EAAE,CAAC;QACtB,MAAM,IAAI,UAAU,CAAC,GAAG,KAAK,wBAAwB,CAAC,CAAC;IACzD,CAAC;IACD,0BAA0B,CAAC,KAAK,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC;IAC9C,sBAAsB,CAAC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC7D,qEAAqE;IACrE,+DAA+D;IAC/D,MAAM,EAAC,OAAO,EAAE,UAAU,EAAC,GAAG,WAAW,CAAC,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IACtE,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,UAAU,CAClB,GAAG,KAAK,2CAA2C,UAAU,EAAE,CAChE,CAAC;IACJ,CAAC;IACD,OAAO,EAAC,OAAO,EAAE,OAAO,EAAC,CAAC;AAC5B,CAAC"}
|
package/dist/member/index.d.ts
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export { memberBenefits } from './benefits.js';
|
|
7
7
|
export { ACCRUALS, PAST_YEARS, PERIOD_KINDS, REMEDY_BASES, SECTIONS, } from './types.js';
|
|
8
|
-
export type { Assumptions, Award, DeclaredPeriod, Holdings, LegacyRules, LegacySectionId, Member, MemberBenefits, PastYears, Position, RemedyBasis, RemedyElection, RetirementChoices, SectionId, ServicePeriod, } from './types.js';
|
|
8
|
+
export type { Assumptions, Award, DeclaredPeriod, Holdings, LegacyRules, LegacySectionId, Member, MemberBenefits, PastYears, Position, RemedyBasis, RemedyElection, RetirementChoices, RulerLedgers, Section2015Walk, SectionId, ServicePeriod, StatementBalance, } from './types.js';
|
|
9
9
|
export { REMEDY, SECTION_OPENED } from './service.js';
|
|
@@ -11,10 +11,10 @@ import type { Built } from './valuation.js';
|
|
|
11
11
|
* first period from its start to the next 5 April
|
|
12
12
|
* (https://www.legislation.gov.uk/ukpga/2004/12/section/238ZB). It holds
|
|
13
13
|
* nothing at its start, so it reads as its tax year opening at nil, which
|
|
14
|
-
* `potAt` gives where the walk starts on the day the member joined.
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* (docs/how-it-works.md#
|
|
14
|
+
* `potAt` gives where the walk starts on the day the member joined. A
|
|
15
|
+
* member's statement is as at 31 March, and a year opening before it, or a
|
|
16
|
+
* leaving before it, throws `BeforeStatement`: the statement gives no
|
|
17
|
+
* balance there (docs/how-it-works.md#where-the-2015-sections-ledger-starts).
|
|
18
18
|
*
|
|
19
19
|
* - **An arrangement per section paid from:** the legacy section, with its
|
|
20
20
|
* remedy window on either basis, since both are paid from it; and the
|
|
@@ -10,13 +10,12 @@ import { refuseBeforePensionInputPeriods, taxYearEndDate, taxYearEndFor, taxYear
|
|
|
10
10
|
import { dayBefore } from '../dates.js';
|
|
11
11
|
import { invariant } from '../errors.js';
|
|
12
12
|
import { isoToDate } from '../iso-date.js';
|
|
13
|
-
import {
|
|
13
|
+
import { pointsToDecimal } from '../pension/prices.js';
|
|
14
|
+
import { schemeYearClosedBy, schemeYearEndFor } from '../pension/scheme-year.js';
|
|
14
15
|
import { refuseElectionMismatch } from './service.js';
|
|
15
16
|
import { accruedLedger, finalSalaryHeldOn, finalSalaryValued, refuseLeavingAfterDeclared, seed2015, walkDates, walksWindow, windowSeed, } from './valuation.js';
|
|
16
17
|
/** The call a refusal names. */
|
|
17
18
|
const ASKED = 'pensionInputPeriod';
|
|
18
|
-
/** A `CpiEntry` is in percentage points; paye-calc's `cpi` a decimal. */
|
|
19
|
-
const POINTS_PER_UNIT = 100;
|
|
20
19
|
/**
|
|
21
20
|
* Each tax year's pension input period for the member leaving on the date
|
|
22
21
|
* asked, in the cash of the price series `seriesAt` gives for an assumed
|
|
@@ -27,10 +26,10 @@ const POINTS_PER_UNIT = 100;
|
|
|
27
26
|
* first period from its start to the next 5 April
|
|
28
27
|
* (https://www.legislation.gov.uk/ukpga/2004/12/section/238ZB). It holds
|
|
29
28
|
* nothing at its start, so it reads as its tax year opening at nil, which
|
|
30
|
-
* `potAt` gives where the walk starts on the day the member joined.
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
* (docs/how-it-works.md#
|
|
29
|
+
* `potAt` gives where the walk starts on the day the member joined. A
|
|
30
|
+
* member's statement is as at 31 March, and a year opening before it, or a
|
|
31
|
+
* leaving before it, throws `BeforeStatement`: the statement gives no
|
|
32
|
+
* balance there (docs/how-it-works.md#where-the-2015-sections-ledger-starts).
|
|
34
33
|
*
|
|
35
34
|
* - **An arrangement per section paid from:** the legacy section, with its
|
|
36
35
|
* remedy window on either basis, since both are paid from it; and the
|
|
@@ -71,6 +70,7 @@ export function inputPeriods(b, seriesAt) {
|
|
|
71
70
|
: walksTo(b, seriesAt(assumedCpi), leaving, closes);
|
|
72
71
|
kept.set(key, walks);
|
|
73
72
|
return periodRead(b, basis, {
|
|
73
|
+
taxYearEnd: end,
|
|
74
74
|
// The close of the day before the year opens, 5 April.
|
|
75
75
|
opens: dayBefore(taxYearStartDate(end)),
|
|
76
76
|
closes,
|
|
@@ -96,7 +96,7 @@ function walksTo(b, prices, leaving, closes) {
|
|
|
96
96
|
reaches,
|
|
97
97
|
own: {
|
|
98
98
|
ledger: accruedLedger(b, {
|
|
99
|
-
window: b.ordinary2015, seed: seed2015(b
|
|
99
|
+
window: b.ordinary2015, seed: seed2015(b), prices,
|
|
100
100
|
}, dates, through),
|
|
101
101
|
period: b.ordinary2015,
|
|
102
102
|
},
|
|
@@ -125,7 +125,9 @@ function periodRead(b, basis, r) {
|
|
|
125
125
|
// An Order is labelled by the scheme year that has just closed when it
|
|
126
126
|
// is applied, and its figure is the September CPI before the tax year.
|
|
127
127
|
const order = r.walks.prices.cpiFor(schemeYearClosedBy(r.opens));
|
|
128
|
-
return {
|
|
128
|
+
return {
|
|
129
|
+
taxYearEnd: r.taxYearEnd, arrangements, cpi: pointsToDecimal(order.cpi),
|
|
130
|
+
};
|
|
129
131
|
}
|
|
130
132
|
/** The legacy section: its final-salary service, and on the 2015 basis
|
|
131
133
|
* the remedy window's career average pot beside it. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-period.js","sourceRoot":"","sources":["../../src/member/input-period.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EACL,+BAA+B,EAAE,cAAc,EAAE,aAAa,EAC9D,gBAAgB,GACjB,MAAM,sBAAsB,CAAC;AAI9B,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AACvC,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAGzC,OAAO,EAAC,kBAAkB,EAAE,gBAAgB,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"input-period.js","sourceRoot":"","sources":["../../src/member/input-period.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EACL,+BAA+B,EAAE,cAAc,EAAE,aAAa,EAC9D,gBAAgB,GACjB,MAAM,sBAAsB,CAAC;AAI9B,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AACvC,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAGzC,OAAO,EAAC,eAAe,EAAC,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAC,kBAAkB,EAAE,gBAAgB,EAAC,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAC,sBAAsB,EAAC,MAAM,cAAc,CAAC;AAKpD,OAAO,EACL,aAAa,EAAE,iBAAiB,EAAE,iBAAiB,EACnD,0BAA0B,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,GACzE,MAAM,gBAAgB,CAAC;AAsCxB,g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cAAc,EAAE,OAAO,CAAC,OAAO;QAC/B,cAAc,EAAE,OAAO,CAAC,OAAO;QAC/B,cAAc,EAAE,OAAO,CAAC,OAAO;QAC/B,cAAc,EAAE,OAAO,CAAC,OAAO;KAChC,CAAC;AACJ,CAAC"}
|
package/dist/member/service.d.ts
CHANGED
|
@@ -62,6 +62,10 @@ export declare function legacyPeriodsOf({ own, window }: LegacyHolding): Service
|
|
|
62
62
|
/** The last day a period is valued to: its own end, or the leaving
|
|
63
63
|
* date where that comes first or the period is still open. */
|
|
64
64
|
export declare function until(p: ServicePeriod, leaving: Date): Date;
|
|
65
|
+
/** The elections a member may be valued on: both bases for a remedy
|
|
66
|
+
* member, `none` alone for anyone else. The one place that rule lives,
|
|
67
|
+
* read by `MemberBenefits.elections` and by the refusal below. */
|
|
68
|
+
export declare function electionsFor(remedy: boolean): readonly RemedyBasis[];
|
|
65
69
|
/** Refuse a remedy member with no election, or an election for anyone
|
|
66
70
|
* else: which basis applies is the caller's to say, never ours. */
|
|
67
71
|
export declare function refuseElectionMismatch(asked: keyof MemberBenefits, remedy: boolean, basis: RemedyBasis): void;
|
package/dist/member/service.js
CHANGED
|
@@ -84,12 +84,18 @@ export function legacyPeriodsOf({ own, window }) {
|
|
|
84
84
|
export function until(p, leaving) {
|
|
85
85
|
return p.to === null || isoToDate(p.to) > leaving ? leaving : isoToDate(p.to);
|
|
86
86
|
}
|
|
87
|
+
/** The elections a member may be valued on: both bases for a remedy
|
|
88
|
+
* member, `none` alone for anyone else. The one place that rule lives,
|
|
89
|
+
* read by `MemberBenefits.elections` and by the refusal below. */
|
|
90
|
+
export function electionsFor(remedy) {
|
|
91
|
+
return remedy
|
|
92
|
+
? [REMEDY_BASES.legacy, REMEDY_BASES.section2015]
|
|
93
|
+
: [REMEDY_BASES.none];
|
|
94
|
+
}
|
|
87
95
|
/** Refuse a remedy member with no election, or an election for anyone
|
|
88
96
|
* else: which basis applies is the caller's to say, never ours. */
|
|
89
97
|
export function refuseElectionMismatch(asked, remedy, basis) {
|
|
90
|
-
|
|
91
|
-
const electionMatches = remedy === elects;
|
|
92
|
-
if (electionMatches)
|
|
98
|
+
if (electionsFor(remedy).includes(basis))
|
|
93
99
|
return;
|
|
94
100
|
throw new RangeError(remedy
|
|
95
101
|
? `${asked}: a remedy member needs an election`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../src/member/service.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAC,QAAQ,EAAE,SAAS,EAAC,MAAM,aAAa,CAAC;AAChD,OAAO,EAAC,kBAAkB,EAAE,SAAS,EAAE,YAAY,EAAC,MAAM,cAAc,CAAC;AACzE,OAAO,EAAC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAC,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AA+BhE;gEACgE;AAChE,MAAM,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;AAC1C,MAAM,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;AACxC;oBACoB;AACpB,MAAM,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;AAC1C;;iCAEiC;AACjC,MAAM,QAAQ,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;AAEvC;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,UAAU,EAAE,WAAW;IACvB,IAAI,EAAE,WAAW;IACjB,EAAE,EAAE,SAAS;IACb,QAAQ,EAAE,QAAQ;CACV,CAAC;AAEX;;;;;GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC;IACvC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,WAAW;CACrB,CAAC;AAEX,MAAM,gBAAgB,GAAG,SAAS,CAAC,SAA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,KAAK,IAAI,EAAE,6BAA6B,CAAC,CAAC;IAC7D,OAAO;QACL,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,GAAG,EAAE;YACH,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,IAAI,EAAE,IAAI,CAAC,MAAM;YACjB,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI;YACzC,IAAI,EAAE,YAAY,CAAC,QAAQ;SAC5B;QACD,MAAM,EAAE,MAAM;YACZ,CAAC,CAAC;gBACA,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,SAAS;gBACvD,IAAI,EAAE,YAAY,CAAC,YAAY;aAChC;YACD,CAAC,CAAC,IAAI;KACT,CAAC;AACJ,CAAC;AAED,SAAS,QAAQ,CAAC,OAAkB;IAClC,OAAO,OAAO,KAAK,QAAQ,CAAC,KAAK,CAAC;AACpC,CAAC"}
|
package/dist/member/types.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { PensionInputPeriod, TaxYearEnd } from '@casomoltd/paye-calc';
|
|
8
8
|
import type { CashChoice, CommutationResult } from '../commutation.js';
|
|
9
|
-
import type { FactorOutcome } from '../factor-basis.js';
|
|
9
|
+
import type { Factored, FactorOutcome } from '../factor-basis.js';
|
|
10
10
|
import type { IsoDate } from '../iso-date.js';
|
|
11
11
|
import type { MemberPay, PayPath } from '../pay-path.js';
|
|
12
12
|
import type { ProjectionPoint } from '../pension/curve.js';
|
|
@@ -14,6 +14,7 @@ import type { EstimatedHistory } from '../pension/history.js';
|
|
|
14
14
|
import type { MemberLedger } from '../pension/ledger.js';
|
|
15
15
|
import type { ProjectionMoney } from '../pension/money.js';
|
|
16
16
|
import type { Prices } from '../pension/prices.js';
|
|
17
|
+
import type { SchemeYearEnd } from '../pension/scheme-year.js';
|
|
17
18
|
import type { FinalSalaryRules, PayMeasure } from '../sections/final-salary.js';
|
|
18
19
|
/**
|
|
19
20
|
* One scheme, the NHS Pension Scheme, in three sections. "Scheme" only
|
|
@@ -40,13 +41,40 @@ export interface Member {
|
|
|
40
41
|
readonly dateOfBirth: IsoDate;
|
|
41
42
|
readonly service: readonly DeclaredPeriod[];
|
|
42
43
|
readonly pay: MemberPay;
|
|
43
|
-
/**
|
|
44
|
-
*
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
/** The 2015 Section balance off the member's Annual Benefit Statement;
|
|
45
|
+
* null where they gave none. */
|
|
46
|
+
readonly statement: StatementBalance | null;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* A 2015 Section balance read off an Annual Benefit Statement, which seeds
|
|
50
|
+
* its ledger at the close of `yearEnd`.
|
|
51
|
+
*
|
|
52
|
+
* A scheme year rather than a date, because an Annual Benefit Statement is
|
|
53
|
+
* always as at 31 March, so a mid-year date cannot be stated. NHSBSA says
|
|
54
|
+
* so in the two pages `sources.ts` exports as `NHSBSA_STATEMENT_GUIDE` and
|
|
55
|
+
* `NHSBSA_ESTIMATE_GUIDE` (SA-63 and SA-64 in docs/source-archive.md). The
|
|
56
|
+
* Scottish and Northern Irish administrators say the same of theirs: SPPA's
|
|
57
|
+
* statement "estimates your pension benefits accrued up to the end of the
|
|
58
|
+
* most recent financial year" (SA-65), its practitioners' running "12 months
|
|
59
|
+
* in arrears", so to the end of the financial year before (SA-66); HSC's
|
|
60
|
+
* is "a snapshot of your pension benefits up to 31st March that year"
|
|
61
|
+
* (SA-67).
|
|
62
|
+
*
|
|
63
|
+
* Out of scope: a deferred member's statement valued at the date of
|
|
64
|
+
* leaving, which NHSBSA's estimate request also offers; a retirement
|
|
65
|
+
* estimate on any other date; and the projection to normal pension age an
|
|
66
|
+
* active member's statement shows from 2026, which is not the accrued
|
|
67
|
+
* balance and is never passed here. NHSBSA: "From 2026, if you're an
|
|
68
|
+
* active member in the 2015 Scheme" the figure "is a projection" (SA-68).
|
|
69
|
+
*
|
|
70
|
+
* Nothing is read before the statement: a read on an earlier date, or a
|
|
71
|
+
* leaving before it, throws `BeforeStatement`.
|
|
72
|
+
*/
|
|
73
|
+
export interface StatementBalance {
|
|
74
|
+
readonly accruedPension: number;
|
|
75
|
+
/** The scheme year the statement runs to; its balance is at that
|
|
76
|
+
* year's 31 March. */
|
|
77
|
+
readonly yearEnd: SchemeYearEnd;
|
|
50
78
|
}
|
|
51
79
|
/** How the cash ruler reads the years behind the run date. */
|
|
52
80
|
export declare const PAST_YEARS: {
|
|
@@ -127,33 +155,18 @@ export interface Award {
|
|
|
127
155
|
/** Where it is held and paid from. */
|
|
128
156
|
readonly section: SectionId;
|
|
129
157
|
readonly periods: readonly ServicePeriod[];
|
|
130
|
-
/** The PENSION at the drawing before its factor
|
|
131
|
-
* measured
|
|
132
|
-
readonly
|
|
133
|
-
/**
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
* cannot forget to ask
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
*
|
|
141
|
-
|
|
142
|
-
readonly automaticLumpSumBeforeFactor: ProjectionMoney;
|
|
143
|
-
/** The PENSION's early or late factor. The lump sum is reduced by its
|
|
144
|
-
* own, `automaticLumpSumFactor`, so read the lump sum before it from
|
|
145
|
-
* `automaticLumpSumBeforeFactor`, never by dividing by this. */
|
|
146
|
-
readonly pensionFactor: FactorOutcome;
|
|
147
|
-
/** The automatic lump sum's own early or late factor; null where the
|
|
148
|
-
* rules pay no automatic lump sum, as a career average award never
|
|
149
|
-
* does. */
|
|
150
|
-
readonly automaticLumpSumFactor: FactorOutcome | null;
|
|
151
|
-
/** A career average award's year-by-year walk, in cash and in today's
|
|
152
|
-
* money; null for final salary, which keeps no balance to walk. */
|
|
153
|
-
readonly ledgers: {
|
|
154
|
-
readonly cash: MemberLedger;
|
|
155
|
-
readonly todaysMoney: MemberLedger;
|
|
156
|
-
} | null;
|
|
158
|
+
/** The PENSION at the drawing: before its factor, final salary as
|
|
159
|
+
* measured or the career average pot as revalued; and after it. */
|
|
160
|
+
readonly pension: Factored;
|
|
161
|
+
/** The automatic lump sum at the drawing, on the same rulers: before its
|
|
162
|
+
* own factor it is the section's multiple of the pension before
|
|
163
|
+
* factor. Nil rather than absent where the rules pay none, as a career
|
|
164
|
+
* average award never does, so a caller cannot forget to ask; its
|
|
165
|
+
* factor is then null. */
|
|
166
|
+
readonly automaticLumpSum: Factored<FactorOutcome | null>;
|
|
167
|
+
/** A career average award's year-by-year walk; null for final salary,
|
|
168
|
+
* which keeps no balance to walk. */
|
|
169
|
+
readonly ledgers: RulerLedgers | null;
|
|
157
170
|
readonly provenance: {
|
|
158
171
|
readonly accrual: typeof ACCRUALS.finalSalary;
|
|
159
172
|
readonly denominator: FinalSalaryRules['denominator'];
|
|
@@ -183,21 +196,30 @@ export interface Position {
|
|
|
183
196
|
/** The price series the cash reading walked with, for converting an
|
|
184
197
|
* outside figure — a cap, a target — into the same rulers. */
|
|
185
198
|
readonly prices: Prices;
|
|
186
|
-
/** The 2015 Section's
|
|
187
|
-
*
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
*
|
|
195
|
-
*
|
|
199
|
+
/** The 2015 Section's own walk: a final-salary section keeps no
|
|
200
|
+
* year-by-year balance to walk. */
|
|
201
|
+
readonly section2015: Section2015Walk;
|
|
202
|
+
}
|
|
203
|
+
/** The 2015 Section's balance as `at()` walked it, read against a
|
|
204
|
+
* statement, which covers this one section. */
|
|
205
|
+
export interface Section2015Walk {
|
|
206
|
+
/** The walk as the member reads it on a statement, in cash, and the
|
|
207
|
+
* same walk in today's money: the same objects as the 2015 Section
|
|
208
|
+
* award's own `ledgers`. */
|
|
209
|
+
readonly ledgers: RulerLedgers;
|
|
210
|
+
/** The years before a stated balance, estimated in today's money; null
|
|
211
|
+
* where the member gave no statement, or joined in its own year.
|
|
212
|
+
* Calibrated to land exactly on the stated balance. */
|
|
196
213
|
readonly estimatedHistory: EstimatedHistory | null;
|
|
197
|
-
/** The
|
|
198
|
-
* rulers. */
|
|
214
|
+
/** The balance at each scheme year end, both rulers. */
|
|
199
215
|
readonly curve: readonly ProjectionPoint[];
|
|
200
216
|
}
|
|
217
|
+
/** One career average walk on both rulers: in cash, and in today's
|
|
218
|
+
* money. */
|
|
219
|
+
export interface RulerLedgers {
|
|
220
|
+
readonly cash: MemberLedger;
|
|
221
|
+
readonly todaysMoney: MemberLedger;
|
|
222
|
+
}
|
|
201
223
|
/** A legacy section's rules, read from its statute. */
|
|
202
224
|
export interface LegacyRules {
|
|
203
225
|
readonly section: LegacySectionId;
|
|
@@ -230,11 +252,20 @@ export interface MemberBenefits {
|
|
|
230
252
|
/** Whether they have a remedy window, and so must pass an election
|
|
231
253
|
* to `at()`. */
|
|
232
254
|
readonly remedy: boolean;
|
|
255
|
+
/** The McCloud elections this member is compared on, each one `at()`
|
|
256
|
+
* and `pensionInputPeriod` accept: both bases for a remedy member, in
|
|
257
|
+
* `REMEDY_BASES` order, and `none` alone otherwise. */
|
|
258
|
+
readonly elections: readonly RemedyBasis[];
|
|
233
259
|
/** The legacy section they hold and its rules; null where they hold
|
|
234
260
|
* the 2015 Section alone. */
|
|
235
261
|
readonly legacy: LegacyRules | null;
|
|
236
262
|
/** The pay every section reads, built once for the member. */
|
|
237
263
|
readonly payPath: PayPath;
|
|
264
|
+
/** The statement's 31 March, the first date the 2015 Section balance is
|
|
265
|
+
* answered on: a read before it, or a leaving before it, throws
|
|
266
|
+
* `BeforeStatement`, so a caller can check its own dates first. Null
|
|
267
|
+
* where the member gave no statement and every date is answered. */
|
|
268
|
+
readonly statementAnswersFrom: Date | null;
|
|
238
269
|
/** The earliest age this member may draw every section they hold on
|
|
239
270
|
* `drawing`, other than through ill health: the law's minimum pension
|
|
240
271
|
* age on that day, or the protected age they keep. A 1995 Section age
|
|
@@ -263,8 +294,9 @@ export interface MemberBenefits {
|
|
|
263
294
|
* arrangement's pension and automatic lump sum at the year's start and
|
|
264
295
|
* end, before any early or late factor, in cash at `assumedCpi` (a
|
|
265
296
|
* decimal) on this member's reading of the past years, whatever CPI they
|
|
266
|
-
* were built at. The period
|
|
267
|
-
* published past years it is the
|
|
297
|
+
* were built at. The period carries `taxYearEnd` as its own, and its
|
|
298
|
+
* `cpi` is read from that series, so on published past years it is the
|
|
299
|
+
* Order's figure. The year the member
|
|
268
300
|
* leaves in closes on the leaving date, and every year after holds the
|
|
269
301
|
* deferred benefits. Throws RangeError for a year before 2016-17, a
|
|
270
302
|
* leaving after the one declared, or an election `at()` would refuse
|
package/dist/member/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/member/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/member/types.ts"],"names":[],"mappings":"AAmBA,uDAAuD;AAEvD;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,KAAK,EAAE,cAAc;IACrB,KAAK,EAAE,cAAc;IACrB,KAAK,EAAE,cAAc;CACb,CAAC;AA2DX,8DAA8D;AAC9D,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,yDAAyD;IACzD,OAAO,EAAE,SAAS;IAClB;;;yDAGqD;IACrD,SAAS,EAAE,WAAW;CACd,CAAC;AAcX;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,cAAc;IACtB,WAAW,EAAE,oBAAoB;CACzB,CAAC;AAmBX,uDAAuD;AAEvD;qEACqE;AACrE,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,QAAQ,EAAE,UAAU;IACpB,YAAY,EAAE,eAAe;CACrB,CAAC;AAYX,sEAAsE;AACtE,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,WAAW,EAAE,cAAc;IAC3B,aAAa,EAAE,gBAAgB;CACvB,CAAC"}
|