Skip to content

Commit 4a6cf04

Browse files
committed
Use Future<any> when type parameter is unspecified for utility functions (jq, get, at)
1 parent a115b13 commit 4a6cf04

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Future.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ export const interpolate = (
258258
* let newFuture = jq<string>(node.future.json_object, ".country")
259259
*
260260
*/
261-
export const jq = <T>(
261+
export const jq = <T = any>(
262262
future: JQDirectiveTarget,
263263
query: string,
264264
_futureType: any = undefined, // @deprecated
@@ -275,7 +275,7 @@ export const jq = <T>(
275275
* let newFuture = get<string>(node.future, "choices[0].text")
276276
*
277277
*/
278-
export const get = <T = unknown>(
278+
export const get = <T = any>(
279279
future: Future<Object>,
280280
path: string | Future<string>,
281281
) => {
@@ -299,7 +299,7 @@ export const get = <T = unknown>(
299299
* let newFuture = at<string>(node.future.strings, 0);
300300
*
301301
*/
302-
export const at = <T>(future: Future<T[]>, index: number | Future<number>) => {
302+
export const at = <T = any>(future: Future<T[]>, index: number | Future<number>) => {
303303
// @ts-ignore (protected _runtimeHint)
304304
if (index instanceof Future) index._runtimeHint = "number";
305305
// @ts-ignore (protected _directive)

0 commit comments

Comments
 (0)