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} */