Skip to content

Commit

Permalink
adapt test new lint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
tkow committed Jan 18, 2019
1 parent a99940b commit 04997e7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/typescript/GenericTlanslateFunction.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
Trans,
withNamespaces,
WithNamespaces,
} from "../../src/index";
} from 'react-i18next';

type TKeys = "title" | "text";

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

class App extends React.Component<IOverloadedWithNamespaces> {
public render() {
class App extends React.Component<OverloadedWithNamespaces> {
render() {
const { t, i18n } = this.props;

const changeLanguage = (lng: string) => {
Expand Down

0 comments on commit 04997e7

Please sign in to comment.