Skip to content

Commit b40e897

Browse files
committed
Remove unused parameters
1 parent 706df76 commit b40e897

2 files changed

Lines changed: 4 additions & 26 deletions

File tree

src/web/config.mjs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ export class ButtonConfigEnums {
4343

4444
export class ButtonConfig {
4545
id;
46-
label;
4746
subjectPrefix;
4847
subject;
4948
body;
@@ -56,7 +55,6 @@ export class ButtonConfig {
5655

5756
constructor({
5857
Id,
59-
Label,
6058
SubjectPrefix,
6159
Subject,
6260
Body,
@@ -66,7 +64,6 @@ export class ButtonConfig {
6664
ForwardType,
6765
}) {
6866
this.id = Id ?? "";
69-
this.label = Label ?? "";
7067
this.subjectPrefix = SubjectPrefix ?? "";
7168
this.subject = Subject ?? "";
7269
this.body = Body ?? "";
@@ -95,12 +92,10 @@ export class ButtonConfig {
9592

9693
export class Config {
9794
culture;
98-
groupLabel;
9995
buttonConfigList;
10096

101-
constructor({ Culture, GroupLabel, ButtonConfigList }) {
97+
constructor({ Culture, ButtonConfigList }) {
10298
this.culture = Culture ?? "en-US";
103-
this.groupLabel = GroupLabel ?? "Typical Reply";
10499
this.buttonConfigList = [];
105100
if (ButtonConfigList) {
106101
for (const buttonConfig of ButtonConfigList) {
@@ -111,10 +106,10 @@ export class Config {
111106
}
112107

113108
export class TypicalReplyConfig {
114-
priority;
115109
configList;
116-
constructor({ Priority, ConfigList }) {
117-
this.priority = Priority ?? 0;
110+
constructor({ ConfigList }) {
111+
// VSTO version TypicalReplyConfig has a Priority property
112+
// but it's not used in this add-in version.
118113
this.configList = [];
119114
if (ConfigList) {
120115
for (const config of ConfigList) {

tests/unit/test-config.mjs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,17 @@ test_TypicalReplyConfig_constructor.parameters = {
1414
argument: {
1515
},
1616
expected: {
17-
priority: 0,
1817
configList: []
1918
},
2019
},
2120
"full": {
2221
argument: {
23-
"Priority": 1,
2422
"ConfigList": [
2523
{
2624
"Culture": "ja-JP",
27-
"GroupLabel": "定型返信",
2825
"ButtonConfigList": [
2926
{
3027
"Id": "button1",
31-
"Label": "いいね!",
3228
"Subject": "件名",
3329
"SubjectPrefix": "[[いいね!]]",
3430
"Body": "いいね!",
@@ -46,15 +42,12 @@ test_TypicalReplyConfig_constructor.parameters = {
4642
]
4743
},
4844
expected: {
49-
priority: 1,
5045
configList: [
5146
{
5247
culture: "ja-JP",
53-
groupLabel: "定型返信",
5448
buttonConfigList: [
5549
{
5650
id: "button1",
57-
label: "いいね!",
5851
subjectPrefix: "[[いいね!]]",
5952
subject: "件名",
6053
body: "いいね!",
@@ -87,7 +80,6 @@ test_ButtonConfig_constructor.parameters = {
8780
},
8881
expected: {
8982
id: "",
90-
label: "",
9183
subjectPrefix: "",
9284
subject: "",
9385
body: "",
@@ -102,7 +94,6 @@ test_ButtonConfig_constructor.parameters = {
10294
"full": {
10395
argument: {
10496
"Id": "button1",
105-
"Label": "いいね!",
10697
"Subject": "件名",
10798
"SubjectPrefix": "[[いいね!]]",
10899
"Body": "いいね!",
@@ -117,7 +108,6 @@ test_ButtonConfig_constructor.parameters = {
117108
},
118109
expected: {
119110
id: "button1",
120-
label: "いいね!",
121111
subjectPrefix: "[[いいね!]]",
122112
subject: "件名",
123113
body: "いいね!",
@@ -137,7 +127,6 @@ test_ButtonConfig_constructor.parameters = {
137127
},
138128
expected: {
139129
id: "",
140-
label: "",
141130
subjectPrefix: "",
142131
subject: "",
143132
body: "",
@@ -155,7 +144,6 @@ test_ButtonConfig_constructor.parameters = {
155144
},
156145
expected: {
157146
id: "",
158-
label: "",
159147
subjectPrefix: "",
160148
subject: "",
161149
body: "",
@@ -173,7 +161,6 @@ test_ButtonConfig_constructor.parameters = {
173161
},
174162
expected: {
175163
id: "",
176-
label: "",
177164
subjectPrefix: "",
178165
subject: "",
179166
body: "",
@@ -191,7 +178,6 @@ test_ButtonConfig_constructor.parameters = {
191178
},
192179
expected: {
193180
id: "",
194-
label: "",
195181
subjectPrefix: "",
196182
subject: "",
197183
body: "",
@@ -209,7 +195,6 @@ test_ButtonConfig_constructor.parameters = {
209195
},
210196
expected: {
211197
id: "",
212-
label: "",
213198
subjectPrefix: "",
214199
subject: "",
215200
body: "",
@@ -227,7 +212,6 @@ test_ButtonConfig_constructor.parameters = {
227212
},
228213
expected: {
229214
id: "",
230-
label: "",
231215
subjectPrefix: "",
232216
subject: "",
233217
body: "",
@@ -245,7 +229,6 @@ test_ButtonConfig_constructor.parameters = {
245229
},
246230
expected: {
247231
id: "",
248-
label: "",
249232
subjectPrefix: "",
250233
subject: "",
251234
body: "",

0 commit comments

Comments
 (0)