Skip to content

Commit 7920b97

Browse files
Jacob Fowleslukeed
Jacob Fowles
andauthoredMay 16, 2020
fix(type): replace unknown array type (#5)
* Update type definitions `array` is not a valid Typescript type. Moved to using `Array<T>` instead and updated `object` to `Record<string, any>` * fix: use `any` instead of `T` type Co-authored-by: Luke Edwards <luke.edwards05@gmail.com>
1 parent 0c60058 commit 7920b97

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎rosetta.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export interface Rosetta<T> {
44
/** Define or extend the language table */
55
set(lang: string, table: T): void;
66
/** Retrieve a translation segment for the current language */
7-
t<X extends object | array>(key: string | (string | number)[], params?: X, lang?: string): string;
7+
t<X extends Record<string, any> | any[]>(key: string | (string | number)[], params?: X, lang?: string): string;
88
}
99

1010
export default function<T>(dict?: Record<string, T>): Rosetta<T>;

0 commit comments

Comments
 (0)
Please sign in to comment.