deepmerge does not exist on window

> [ts] Property 'deepmerge' does not exist on type 'Window'.

`deepmerge` is not found if it is being used within the browser
This commit is contained in:
Ryan Naddy 2017-11-12 10:56:58 -06:00 committed by GitHub
parent 6a2ea9f633
commit 1bca60eeae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,3 +18,10 @@ declare namespace deepmerge {
function all<T>(objects: Array<Partial<T>>, options?: Options): T;
}
declare global {
interface Window {
deepmerge<T>(x: Partial<T>, y: Partial<T>, options?: deepmerge.Options): T;
deepmerge<T1, T2>(x: T1, y: T2, options?: deepmerge.Options): T1 & T2;
}
}