• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

LukaJCB / ts-mls / 20944655171

13 Jan 2026 04:25AM UTC coverage: 95.199% (-0.5%) from 95.727%
20944655171

Pull #200

github

web-flow
Merge eec989c7f into 6f65b753e
Pull Request #200: Use CiphersuiteId instead of CiphersuiteName for internal values

412 of 421 branches covered (97.86%)

Branch coverage included in aggregate %.

193 of 208 new or added lines in 35 files covered. (92.79%)

6 existing lines in 3 files now uncovered.

2364 of 2495 relevant lines covered (94.75%)

72670.37 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

88.89
/src/defaultProposalType.ts
1
import { decodeUint16, uint16Encoder } from "./codec/number.js"
2
import { Decoder, mapDecoderOption } from "./codec/tlsDecoder.js"
3
import { BufferEncoder, encode, Encoder } from "./codec/tlsEncoder.js"
4

5
/** @public */
6
export const defaultProposalTypes = {
3✔
7
  add: 1,
8
  update: 2,
9
  remove: 3,
10
  psk: 4,
11
  reinit: 5,
12
  external_init: 6,
13
  group_context_extensions: 7,
14
} as const
15

16
/** @public */
17
export type DefaultProposalTypeName = keyof typeof defaultProposalTypes
18
export type DefaultProposalTypeValue = (typeof defaultProposalTypes)[DefaultProposalTypeName]
19

20
const defaultProposalTypeValues = new Set<number>(Object.values(defaultProposalTypes))
3✔
21

22
export function defaultProposalTypeValueFromName(name: DefaultProposalTypeName): DefaultProposalTypeValue {
NEW
23
  return defaultProposalTypes[name]
×
24
}
25

26
export function isDefaultProposalTypeValue(v: number): v is DefaultProposalTypeValue {
27
  return defaultProposalTypeValues.has(v)
1,332✔
28
}
29

30
export const defaultProposalTypeValueEncoder: BufferEncoder<DefaultProposalTypeValue> = uint16Encoder
3✔
31

32
export const encodeDefaultProposalTypeValue: Encoder<DefaultProposalTypeValue> = encode(defaultProposalTypeValueEncoder)
3✔
33

34
export const decodeDefaultProposalTypeValue: Decoder<DefaultProposalTypeValue> = mapDecoderOption(decodeUint16, (v) =>
3✔
35
  defaultProposalTypeValues.has(v) ? (v as DefaultProposalTypeValue) : undefined,
4,764✔
36
)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc