Improve parsing of default and initial value
Summary
Vuedoc Parser can be improved by adding parsing of UnaryExpression and improving output of default value.
Improved Interface
interface PropEntry extends Entry {
kind: 'prop';
name: string; // v-model when the @model keyword is attached
type: string | string[]; // ex. Array, Object, String, [String, Number]
nativeType: NativeTypeEnum;
- default: any; // '__undefined__' value for uncatchable value
+ default?: string;
required: boolean = false;
describeModel: boolean; // true when the @model keyword is attached
}
interface DataEntry extends Entry {
kind: 'data';
name: string;
type: NativeTypeEnum;
- initial: any; // '__undefined__' value for uncatchable value
+ initial?: string;
}
type MethodParam = {
type: string;
name: string;
description: string;
- defaultValue: any;
+ defaultValue?: string;
}