Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion types/react-bootstrap/lib/NavItem.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from "react";
import { SelectCallback, Sizes } from "react-bootstrap";

declare namespace NavItem {
export interface NavItemProps extends React.HTMLProps<NavItem> {
export interface NavItemProps extends Omit<React.HTMLProps<NavItem>, "onToggle"> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC extending from Omit is cursed, but I guess it's not uncommon on DT.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I suspect as much since we're going from an interface to a type. But I'm not aware how to use this pattern in TypeScript without Omit i.e. I don't know how to override a property without Omit. TypeScript always wants properties to be assignable when extending an interface

active?: boolean | undefined;
brand?: any; // TODO: Add more specific type
bsSize?: Sizes | undefined;
Expand Down
2 changes: 1 addition & 1 deletion types/react-bootstrap/lib/Navbar.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import NavbarHeader = require("./NavbarHeader");
import NavbarToggle = require("./NavbarToggle");

declare namespace Navbar {
export interface NavbarProps extends React.HTMLProps<Navbar> {
export interface NavbarProps extends Omit<React.HTMLProps<Navbar>, "onToggle"> {
brand?: any; // TODO: Add more specific type
bsSize?: Sizes | undefined;
bsStyle?: string | undefined;
Expand Down