Skip to content

Commit 14a8159

Browse files
authored
show field type when generating accessors (#2459)
Signed-off-by: Shi Chen <[email protected]>
1 parent 3dfc158 commit 14a8159

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/protocol.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ export interface AccessorField {
246246
isStatic: boolean;
247247
generateGetter: boolean;
248248
generateSetter: boolean;
249+
typeName: string;
249250
}
250251

251252
export interface AccessorCodeActionParams extends CodeActionParams {

src/sourceAction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ async function generateAccessors(languageClient: LanguageClient, params: Accesso
231231
description.push('setter');
232232
}
233233
return {
234-
label: accessor.fieldName,
234+
label: `${accessor.fieldName}: ${accessor.typeName}`,
235235
description: (accessor.isStatic ? 'static ' : '')+ description.join(', '),
236236
originalField: accessor,
237237
};

0 commit comments

Comments
 (0)