parseUint16 の引数名修正

This commit is contained in:
Akihiko.KIgure 2022-01-11 18:07:07 +09:00 committed by GitHub
parent 33699f07f1
commit 64729aec7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,8 +13,8 @@ const GPIOPortMapSizeMax = 1024;
const Uint16Max = 65535;
function parseUint16(string: string) {
const n = Number.parseInt(string, 10);
function parseUint16(parseString: string) {
const n = Number.parseInt(parseString, 10);
if (0 <= n && n <= Uint16Max) return n;
else throw new RangeError(`Must be between 0 and ${Uint16Max}.`);
}