Skip to content

Commit 9073fcd

Browse files
committed
Clean up some comments
1 parent 6122021 commit 9073fcd

File tree

2 files changed

+2
-29
lines changed

2 files changed

+2
-29
lines changed

src/Future.ts

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,7 @@ type TraceProp = string | Future<string> | number | Future<number>;
1212
type Concatable = string | Future<string>;
1313
type JQCompatible = Record<string, unknown> | any[] | string | number;
1414
type JQDirectiveTarget = Future<any> | JQCompatible;
15-
// type FutureTypeMap = {
16-
// string: FutureString;
17-
// object: FutureAnyObject;
18-
// number: FutureNumber;
19-
// boolean: FutureBoolean;
20-
// };
21-
//
15+
2216
const parsePath = (path: string): TraceProp[] => {
2317
// Split the path by dots or brackets, and filter out empty strings
2418
const parts = path.split(/\.|\[|\]\[?/).filter(Boolean);
@@ -218,27 +212,6 @@ export class Future<T> {
218212
return this._directive.result();
219213
}
220214

221-
// TODO(liam): don't think we need this type mapping here
222-
// static jq<T extends keyof FutureTypeMap>(
223-
// future: JQDirectiveTarget,
224-
// query: string,
225-
// futureType: keyof FutureTypeMap = "string",
226-
// ): FutureTypeMap[T] {
227-
// const directive = new JQ(query, future);
228-
// switch (futureType) {
229-
// case "string":
230-
// return new FutureString(directive) as FutureTypeMap[T];
231-
// case "number":
232-
// return new FutureNumber(directive) as FutureTypeMap[T];
233-
// case "object":
234-
// return new FutureAnyObject(directive) as FutureTypeMap[T];
235-
// case "boolean":
236-
// return new FutureBoolean(directive) as FutureTypeMap[T];
237-
// default:
238-
// throw new Error(`Unknown future type: ${futureType}`);
239-
// }
240-
// }
241-
242215
toJSON() {
243216
return {
244217
id: this._id,

tests/Future.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ describe("Future", () => {
9494
Trace.Operation.key("attr", "a"),
9595
Trace.Operation.key("item", 1),
9696
Trace.Operation.future("attr", "123"),
97-
Trace.Operation.future("attr", "456"), // LIAM_TODO: there isn't a way to distinguish at runtime using static types
97+
Trace.Operation.future("attr", "456"), // TODO(liam): there isn't a way to distinguish at runtime using static types
9898
// Trace.Operation.future("item", "456"),
9999
],
100100
});

0 commit comments

Comments
 (0)