diff --git a/index.js b/index.js index c0a88f3..9cf9fa0 100644 --- a/index.js +++ b/index.js @@ -79,6 +79,10 @@ function formatType(node, getHref) { return [t('null')]; case Syntax.VoidLiteral: return [t('void')]; + case 'StringLiteral': // Does not appear to be exported in doctrine.Syntax + return [t(JSON.stringify(node.name))]; + case 'NumberLiteral': // Does not appear to be exported in doctrine.Syntax + return [t(JSON.stringify(node.name))]; case Syntax.UndefinedLiteral: return [link('undefined', getHref)]; case Syntax.NameExpression: