JsDoc types fixed and typecheck activated

This commit is contained in:
barsdeveloper
2022-03-30 21:59:41 +02:00
parent 464a9c068d
commit 90400110e2
33 changed files with 391 additions and 151 deletions

View File

@@ -11,6 +11,11 @@ export default class GeneralSerializer extends ISerializer {
this.wrap = wrap
}
/**
* @template T
* @param {String} value
* @returns {T}
*/
read(value) {
let grammar = Grammar.getGrammarForType(ISerializer.grammar, this.entityType)
const parseResult = grammar.parse(value)
@@ -21,6 +26,11 @@ export default class GeneralSerializer extends ISerializer {
return parseResult.value
}
/**
* @template T
* @param {T} object
* @returns {String}
*/
write(object) {
let result = this.wrap(this.subWrite([], object))
return result