-
Notifications
You must be signed in to change notification settings - Fork 149
/
index.ts
29 lines (22 loc) · 915 Bytes
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import * as constants from './src/constants';
import container from './src/container';
import * as dropHandlers from './src/dropHandlers';
import { SmoothDnDCreator, ContainerOptions } from './src/exportTypes';
import { ElementX } from './src/interfaces';
export * from './src/exportTypes';
export {
container as smoothDnD,
constants,
dropHandlers,
};
const deprecetedDefaultExport: SmoothDnDCreator = function(element: ElementX, options?: ContainerOptions) {
console.warn('default export is deprecated. please use named export "smoothDnD"');
if (deprecetedDefaultExport.dropHandler !== undefined) {
container.dropHandler = deprecetedDefaultExport.dropHandler;
}
if (deprecetedDefaultExport.wrapChild !== undefined) {
container.wrapChild = deprecetedDefaultExport.wrapChild;
}
return container(element, options);
};
export default deprecetedDefaultExport;