type toJSON returns

This commit is contained in:
Kevin Jahns 2020-01-22 16:44:30 +01:00
parent 6cd9e2be32
commit 0e6deab9c9
3 changed files with 7 additions and 2 deletions

View File

@ -676,8 +676,7 @@ export class YText extends AbstractType {
/** /**
* Returns the unformatted string representation of this YText type. * Returns the unformatted string representation of this YText type.
* *
* Avoids undefined being returned when called as a nested type. * @return {string}
*
* @public * @public
*/ */
toJSON () { toJSON () {

View File

@ -242,6 +242,9 @@ export class YXmlFragment extends AbstractType {
return typeListMap(this, xml => xml.toString()).join('') return typeListMap(this, xml => xml.toString()).join('')
} }
/**
* @return {string}
*/
toJSON () { toJSON () {
return this.toString() return this.toString()
} }

View File

@ -70,6 +70,9 @@ export class YXmlText extends YText {
}).join('') }).join('')
} }
/**
* @return {string}
*/
toJSON () { toJSON () {
return this.toString() return this.toString()
} }