|
1 | 1 | declare module '@vuedoc/parser/parser/Parser.js' {
|
2 | 2 | import EventEmitter from 'node:events';
|
3 | 3 |
|
| 4 | + |
4 | 5 | export type Options = {
|
5 | 6 | /**
|
6 | 7 | * Source to parse
|
@@ -53,36 +54,106 @@ declare module '@vuedoc/parser/parser/Parser.js' {
|
53 | 54 | walk(): Parser;
|
54 | 55 | }
|
55 | 56 |
|
56 |
| - export interface NameEntry { |
57 |
| - kind: 'name'; |
58 |
| - value: string; |
| 57 | + export type ParsingEntry = ComputedEntry |
| 58 | + | DataEntry |
| 59 | + | DescriptionEntry |
| 60 | + | EventEntry |
| 61 | + | InheritAttrsEntry |
| 62 | + | KeywordsEntry |
| 63 | + | MethodEntry |
| 64 | + | ModelEntry |
| 65 | + | NameEntry |
| 66 | + | PropEntry |
| 67 | + | SlotEntry; |
| 68 | + |
| 69 | + export type Keyword = { |
| 70 | + name: string; |
| 71 | + description?: string; |
| 72 | + }; |
| 73 | + |
| 74 | + export interface AbstractEntry<Kind extends string> { |
| 75 | + kind: Kind; |
| 76 | + description?: string; |
| 77 | + category?: string; |
| 78 | + version?: string; |
| 79 | + visibility: Visibility; |
| 80 | + keywords: Keyword[]; |
| 81 | + } |
| 82 | + |
| 83 | + export interface ComputedEntry extends AbstractEntry<'computed'> { |
| 84 | + type: string; |
| 85 | + name: string; |
| 86 | + dependencies: string[]; |
| 87 | + } |
| 88 | + |
| 89 | + export interface DataEntry extends AbstractEntry<'data'> { |
| 90 | + type: string; |
| 91 | + name: string; |
| 92 | + initialValue: string; |
59 | 93 | }
|
60 | 94 |
|
61 |
| - export interface DescriptionEntry { |
62 |
| - kind: 'description' |
| 95 | + export interface DescriptionEntry extends AbstractEntry<'description'> { |
63 | 96 | value: string;
|
64 | 97 | }
|
| 98 | + |
| 99 | + export interface EventEntry extends AbstractEntry<'event'> { |
| 100 | + name: string; |
| 101 | + arguments: Array<{ |
| 102 | + name: string; |
| 103 | + type: string; |
| 104 | + description: string; |
| 105 | + rest: boolean; |
| 106 | + }>; |
| 107 | + } |
65 | 108 |
|
66 |
| - export interface InheritAttrsEntry { |
67 |
| - kind: 'inheritAttrs' |
| 109 | + export interface InheritAttrsEntry extends AbstractEntry<'inheritAttrs'> { |
68 | 110 | value: boolean;
|
69 | 111 | }
|
70 | 112 |
|
71 |
| - export interface KeywordsEntry { |
72 |
| - kind: 'keywords'; |
| 113 | + export interface KeywordsEntry extends AbstractEntry<'keywords'> { |
73 | 114 | value: Keyword[];
|
74 | 115 | }
|
| 116 | + |
| 117 | + export interface MethodEntry extends AbstractEntry<'method'> { |
| 118 | + name: string; |
| 119 | + syntax: string[]; |
| 120 | + params: Array<{ |
| 121 | + name: string; |
| 122 | + type: string; |
| 123 | + description: string; |
| 124 | + defaultValue: string; |
| 125 | + rest: boolean; |
| 126 | + }>; |
| 127 | + returns: { |
| 128 | + type: string; |
| 129 | + description?: string; |
| 130 | + }; |
| 131 | + } |
75 | 132 |
|
76 |
| - export interface ModelEntry { |
77 |
| - kind: 'model'; |
| 133 | + export interface ModelEntry extends AbstractEntry<'model'> { |
78 | 134 | prop: string;
|
79 | 135 | event: string;
|
80 |
| - description?: string; |
81 |
| - keywords: Keyword[]; |
82 | 136 | }
|
83 |
| - |
84 |
| - export type Keyword = { |
| 137 | + |
| 138 | + export interface NameEntry extends AbstractEntry<'name'> { |
| 139 | + value: string; |
| 140 | + } |
| 141 | + |
| 142 | + export interface PropEntry extends AbstractEntry<'prop'> { |
| 143 | + type: string; |
| 144 | + name: string; |
| 145 | + default: string; |
| 146 | + required: boolean; |
| 147 | + describeModel: boolean; |
| 148 | + } |
| 149 | + |
| 150 | + export interface SlotEntry extends AbstractEntry<'slot'> { |
85 | 151 | name: string;
|
86 | 152 | description?: string;
|
87 |
| - }; |
| 153 | + props: Array<{ |
| 154 | + name: string; |
| 155 | + type: string; |
| 156 | + description?: string; |
| 157 | + }>; |
| 158 | + } |
88 | 159 | }
|
0 commit comments