Skip to content

Commit 12aa64c

Browse files
committed
adapt fix test new lint rules
1 parent a99940b commit 12aa64c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/typescript/GenericTlanslateFunction.test.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
Trans,
55
withNamespaces,
66
WithNamespaces,
7-
} from "../../src/index";
7+
} from 'react-i18next';
88

99
type TKeys = "title" | "text";
1010

@@ -46,13 +46,15 @@ type AnotherArticleKeys = "anotherArticle.part1" | "anotherArticle.part2";
4646
/**
4747
* Overload makes completion of arguments by without specifying type parameters
4848
*/
49-
interface IOverloadedWithNamespaces extends WithNamespaces {
49+
interface OverloadedWithNamespaces extends WithNamespaces {
5050
t(key: ArticleKeys, b?: object): any;
51+
// NOTION: disable no-unnecessary-generics for generic test
52+
// tslint:disable-next-line:no-unnecessary-generics
5153
t<T extends AnotherArticleKeys>(key: T, b: {name: string}): any;
5254
}
5355

54-
class App extends React.Component<IOverloadedWithNamespaces> {
55-
public render() {
56+
class App extends React.Component<OverloadedWithNamespaces> {
57+
render() {
5658
const { t, i18n } = this.props;
5759

5860
const changeLanguage = (lng: string) => {

0 commit comments

Comments
 (0)