[@types/why-did-you-update] Add missing properties to Options interface (#33810)

* Add missing properties to `Options` interface

The options interface was missing some options outlined here: https://github.com/maicki/why-did-you-update#options

* Make notifier optional
This commit is contained in:
Connor Schlesiger
2019-03-12 11:02:40 -07:00
committed by Wesley Wigham
parent 45307b03ae
commit 6a36646bbf
+16
View File
@@ -7,9 +7,25 @@
/// <reference types="react" />
declare module "why-did-you-update" {
interface Diffs {
name: string;
prev: any;
next: any;
type: any;
}
interface Options {
include?: RegExp;
exclude?: RegExp;
groupByComment?: boolean;
collapseComponentGroups?: boolean;
notifier?: (
groupByComponent: boolean,
collapseComponentGroups: boolean,
displayName: string,
diffs: Diffs[]
) => void;
}
export function whyDidYouUpdate(react: typeof React, options?: Options): void;
}