From 6f276856d63a51353c006fadb014fa8a11b3b243 Mon Sep 17 00:00:00 2001 From: barsdeveloper Date: Fri, 22 Sep 2023 23:03:09 +0200 Subject: [PATCH] Fix grammar issues --- js/Utility.js | 2 +- js/serialization/Grammar.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/Utility.js b/js/Utility.js index 503c41a..b7e16fa 100755 --- a/js/Utility.js +++ b/js/Utility.js @@ -271,7 +271,7 @@ export default class Utility { : new /** @type {EntityConstructor} */(targetType)(value) } if (value instanceof Boolean || value instanceof Number || value instanceof String) { - value = value.valueOf() // Get the relative primitive value + value = /** @type {AnyValue} */(value.valueOf()) // Get the relative primitive value } return value } diff --git a/js/serialization/Grammar.js b/js/serialization/Grammar.js index ac38687..022e325 100755 --- a/js/serialization/Grammar.js +++ b/js/serialization/Grammar.js @@ -245,7 +245,7 @@ export default class Grammar { /** * @template {IEntity} T - * @param {AnyConstructor & EntityConstructor} entityType + * @param {(new (...args: any) => T) & EntityConstructor} entityType * @param {Boolean | Number} acceptUnknownKeys Number to specify the limit or true, to let it be a reasonable value * @returns {Parsimmon.Parser} */