Skip to content

Commit 7bf0fc8

Browse files
committedJul 31, 2019
fix: export default function (typings)
1 parent 159e724 commit 7bf0fc8

File tree

5 files changed

+15
-7
lines changed

5 files changed

+15
-7
lines changed
 

‎dist/merge.browser.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/merge.browser.test.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -208,14 +208,15 @@ module.exports = chai;
208208

209209
Object.defineProperty(exports, "__esModule", { value: true });
210210
module.exports = exports = main;
211+
exports.default = main;
211212
function main() {
212213
var items = [];
213214
for (var _i = 0; _i < arguments.length; _i++) {
214215
items[_i] = arguments[_i];
215216
}
216217
return merge.apply(void 0, items);
217218
}
218-
exports.default = main;
219+
exports.main = main;
219220
main.clone = clone;
220221
main.isPlainObject = isPlainObject;
221222
main.recursive = recursive;

‎lib/src/index.d.ts

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1+
export default main;
12
export declare function main(clone: boolean, ...items: any[]): any;
3+
export declare namespace main {
4+
var clone: typeof import(".").clone;
5+
var isPlainObject: typeof import(".").isPlainObject;
6+
var recursive: typeof import(".").recursive;
7+
}
28
export declare function main(...items: any[]): any;
3-
declare function main(...items: any[]): any;
4-
declare namespace main {
9+
export declare namespace main {
510
var clone: typeof import(".").clone;
611
var isPlainObject: typeof import(".").isPlainObject;
712
var recursive: typeof import(".").recursive;
813
}
9-
export default main;
1014
export declare function merge(clone: boolean, ...items: any[]): any;
1115
export declare function merge(...items: any[]): any;
1216
export declare function recursive(clone: boolean, ...items: any[]): any;

‎lib/src/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
"use strict";
22
Object.defineProperty(exports, "__esModule", { value: true });
33
module.exports = exports = main;
4+
exports.default = main;
45
function main() {
56
var items = [];
67
for (var _i = 0; _i < arguments.length; _i++) {
78
items[_i] = arguments[_i];
89
}
910
return merge.apply(void 0, items);
1011
}
11-
exports.default = main;
12+
exports.main = main;
1213
main.clone = clone;
1314
main.isPlainObject = isPlainObject;
1415
main.recursive = recursive;

‎src/index.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
module.exports = exports = main
22

3+
export default main
4+
35
export function main(clone: boolean, ...items: any[]): any
46
export function main(...items: any[]): any
5-
export default function main(...items: any[]) {
7+
export function main(...items: any[]) {
68
return merge(...items)
79
}
810

0 commit comments

Comments
 (0)
Please sign in to comment.