Use generics to better type TabbedView (#10726)
This commit is contained in:
parent
fcf2fe2c1d
commit
a629ce3a53
12 changed files with 56 additions and 52 deletions
|
@ -81,8 +81,8 @@ export default class UserSettingsDialog extends React.Component<IProps, IState>
|
|||
this.setState({ newSessionManagerEnabled: newValue });
|
||||
};
|
||||
|
||||
private getTabs(): NonEmptyArray<Tab> {
|
||||
const tabs: Tab[] = [];
|
||||
private getTabs(): NonEmptyArray<Tab<UserTab>> {
|
||||
const tabs: Tab<UserTab>[] = [];
|
||||
|
||||
tabs.push(
|
||||
new Tab(
|
||||
|
@ -208,7 +208,7 @@ export default class UserSettingsDialog extends React.Component<IProps, IState>
|
|||
),
|
||||
);
|
||||
|
||||
return tabs as NonEmptyArray<Tab>;
|
||||
return tabs as NonEmptyArray<Tab<UserTab>>;
|
||||
}
|
||||
|
||||
public render(): React.ReactNode {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue