Skip to content

Commit

Permalink
show field type when generating accessors
Browse files Browse the repository at this point in the history
Signed-off-by: Shi Chen <[email protected]>
  • Loading branch information
CsCherrYY committed May 23, 2022
1 parent 3dfc158 commit 05b5967
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ export interface AccessorField {
isStatic: boolean;
generateGetter: boolean;
generateSetter: boolean;
typeName: string;
}

export interface AccessorCodeActionParams extends CodeActionParams {
Expand Down
2 changes: 1 addition & 1 deletion src/sourceAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ async function generateAccessors(languageClient: LanguageClient, params: Accesso
description.push('setter');
}
return {
label: accessor.fieldName,
label: `${accessor.fieldName}: ${accessor.typeName}`,
description: (accessor.isStatic ? 'static ' : '')+ description.join(', '),
originalField: accessor,
};
Expand Down

0 comments on commit 05b5967

Please sign in to comment.