vue-docgen-api
Advanced tools
Comparing version 4.54.2 to 4.56.0
@@ -27,3 +27,4 @@ "use strict"; | ||
'throwExpressions', | ||
'nullishCoalescingOperator' | ||
'nullishCoalescingOperator', | ||
'importAssertions' | ||
] | ||
@@ -30,0 +31,0 @@ }; |
@@ -49,2 +49,8 @@ "use strict"; | ||
}); | ||
it('should parse imports with import assertions', () => { | ||
const src = `import 'some-file.json' assert {type: 'json'}`; | ||
expect(() => { | ||
parser.parse(src); | ||
}).not.toThrow(); | ||
}); | ||
}); |
@@ -6,4 +6,4 @@ import * as bt from '@babel/types'; | ||
import { ParseOptions } from './parse'; | ||
export declare type Handler = (doc: Documentation, componentDefinition: NodePath, ast: bt.File, opt: ParseOptions) => Promise<void>; | ||
export type Handler = (doc: Documentation, componentDefinition: NodePath, ast: bt.File, opt: ParseOptions) => Promise<void>; | ||
export default function parseScript(source: string, options: ParseOptions, documentation?: Documentation, forceSingleExport?: boolean, noNeedForExport?: boolean): Promise<Documentation[] | undefined>; | ||
export declare function addDefaultAndExecuteHandlers(componentDefinitions: Map<string, NodePath>, ast: bt.File, options: ParseOptions, documentation?: Documentation, forceSingleExport?: boolean): Promise<Documentation[] | undefined>; |
@@ -8,4 +8,4 @@ import { TemplateChildNode } from '@vue/compiler-dom'; | ||
} | ||
export declare type Handler = (documentation: Documentation, templateAst: TemplateChildNode, siblings: TemplateChildNode[], options: TemplateParserOptions) => void; | ||
export type Handler = (documentation: Documentation, templateAst: TemplateChildNode, siblings: TemplateChildNode[], options: TemplateParserOptions) => void; | ||
export default function parseTemplate(tpl: Pick<SFCTemplateBlock, 'content' | 'attrs'>, documentation: Documentation, handlers: Handler[], opts: ParseOptions): void; | ||
export declare function traverse(templateAst: TemplateChildNode, documentation: Documentation, handlers: Handler[], siblings: TemplateChildNode[], options: TemplateParserOptions): void; |
@@ -12,3 +12,3 @@ import { NodePath } from 'ast-types/lib/node-path'; | ||
export default function slotHandler(documentation: Documentation, path: NodePath): Promise<void>; | ||
declare type SlotComment = Pick<SlotDescriptor, 'bindings'>; | ||
type SlotComment = Pick<SlotDescriptor, 'bindings'>; | ||
export declare function getSlotComment(path: NodePath, descriptor: SlotDescriptor): SlotComment | undefined; | ||
@@ -15,0 +15,0 @@ export declare function parseSlotDocBlock(str: string, descriptor: SlotDescriptor): { |
{ | ||
"name": "vue-docgen-api", | ||
"version": "4.54.2", | ||
"version": "4.56.0", | ||
"description": "Toolbox to extract information from Vue component files for documentation generation purposes.", | ||
@@ -46,7 +46,7 @@ "homepage": "https://vue-styleguidist.github.io", | ||
"globby": "10.0.2", | ||
"vue": "2.7.11", | ||
"vue": "2.7.14", | ||
"vue-class-component": "7.2.6", | ||
"vue-clickaway": "2.2.2", | ||
"vue-property-decorator": "7.3.0", | ||
"vuetify": "2.6.10" | ||
"vuetify": "2.6.12" | ||
}, | ||
@@ -53,0 +53,0 @@ "scripts": { |
491624
11559