Export isTlvName, so a string can be narrowed into tlvs
Test / lint (pull_request) Successful in 22s
Test / test (20) (pull_request) Successful in 30s
Test / test (22) (pull_request) Successful in 30s
Test / test (24) (pull_request) Successful in 30s
Mirror / push (push) Successful in 5s
Test / test (18) (pull_request) Successful in 34s
Test / test (26) (pull_request) Successful in 35s

This commit is contained in:
2026-09-27 15:39:43 +02:00
parent 4094949917
commit dd09a27dc6
5 changed files with 9 additions and 5 deletions
+1 -1
View File
@@ -253,7 +253,7 @@ function readTlv(pdu: Buffer, offset: number): Result<{ octets: number; occurren
return { occurrence: { definition, tagId, value }, octets: 4 + tagLength };
}
function isTlvName(name: string): name is TlvName {
export function isTlvName(name: string): name is TlvName {
return Object.hasOwn(specs, name);
}