merge
merge copied to clipboard
Typescript definitions
Hi,
I'd be great if you add a typescript definitions file. I've created one for you already.
declare module 'merge' {
function merge<A extends Object>(a: A): A;
function merge<A extends Object, B>(a: A, b: B): A & B;
function merge<A extends Object, B, C>(a: A, b: B, c: C): A & B & C;
function merge<A extends Object, B, C, D>(a: A, b: B, c: C, d: D): A & B & C & D;
function merge<A extends Object, B, C, D, E>(a: A, b: B, c: C, d: D, e: E): A & B & C & D & E;
function merge<A extends Object>(recursive: boolean, a: A): A;
function merge<A extends Object, B>(recursive: boolean, a: A, b: B): A & B;
function merge<A extends Object, B, C>(recursive: boolean, a: A, b: B, c: C): A & B & C;
function merge<A extends Object, B, C, D>(recursive: boolean, a: A, b: B, c: C, d: D): A & B & C & D;
function merge<A extends Object, B, C, D, E>(recursive: boolean, a: A, b: B, c: C, d: D, e: E): A & B & C & D & E;
namespace merge {
function recursive<A extends Object>(a: A): A;
function recursive<A extends Object, B>(a: A, b: B): A & B;
function recursive<A extends Object, B, C>(a: A, b: B, c: C): A & B & C;
function recursive<A extends Object, B, C, D>(a: A, b: B, c: C, d: D): A & B & C & D;
function recursive<A extends Object, B, C, D, E>(a: A, b: B, c: C, d: D, e: E): A & B & C & D & E;
}
export = merge;
}
You'd make my life much easier :)
The type definitions should be included in a dedicated npm package, as recommended by the TypeScript team; that's now the way forward so that typings can be added as any other dependency to a project easily without necessarily requiring library releases for typings modifications (e.g., bug fixing)
Could you please add a reference?
It's described here: https://blogs.msdn.microsoft.com/typescript/2016/06/15/the-future-of-declaration-files/
So will the support for "typescript"?
Any updates on types? The library seems to be updated to typescript with v2.0.0
but not published to npm.
Yes and I'd like to use it for a project, but I don't want to have Github dependencies... So please publish the updated package to npm