Skip to content

Commit 10d2e08

Browse files
authored
Resolve TODO comment (#3233)
## Summary: I added this TODO about a year ago. I don't know if the `Key` type it referred to existed at that time, but it definitely doesn't exist now. I checked, and the type of `extraKeys` really is `KeypadKey[]`, according to the parser. Issue: none ## Test plan: CI checks should pass. Author: benchristel Reviewers: handeyeco Required Reviewers: Approved By: handeyeco Checks: ⏭️ 1 check has been skipped, ✅ 10 checks were successful Pull Request URL: #3233
1 parent 6ad8f23 commit 10d2e08

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

.changeset/cyan-eels-buy.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@khanacademy/perseus-core": patch
3+
---
4+
5+
Internal: Delete outdated TODO comment.

packages/perseus-core/src/data-schema.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,6 @@ export type PerseusExpressionWidgetOptions = {
501501
times: boolean;
502502
// What extra keys need to be displayed on the keypad so that the
503503
// question can be answerable without a keyboard (ie mobile)
504-
// TODO: this is really Key[]
505504
extraKeys?: KeypadKey[];
506505
// visible label associated with the MathQuill field
507506
visibleLabel?: string;

packages/perseus-core/src/widgets/expression/derive-extra-keys.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
import * as KAS from "@khanacademy/kas";
22

3-
import {
4-
type KeypadKey,
5-
type KeypadConfiguration,
6-
KeypadKeys,
7-
} from "../../keypad";
3+
import {type KeypadKey, KeypadKeys} from "../../keypad";
84

95
import type {PerseusExpressionWidgetOptions} from "../../data-schema";
106

@@ -14,7 +10,7 @@ import type {PerseusExpressionWidgetOptions} from "../../data-schema";
1410
*/
1511
function deriveExtraKeys(
1612
widgetOptions: PerseusExpressionWidgetOptions,
17-
): KeypadConfiguration["extraKeys"] {
13+
): KeypadKey[] {
1814
if (widgetOptions.extraKeys) {
1915
return widgetOptions.extraKeys;
2016
}

0 commit comments

Comments
 (0)