File tree Expand file tree Collapse file tree 3 files changed +17
-7
lines changed Expand file tree Collapse file tree 3 files changed +17
-7
lines changed Original file line number Diff line number Diff line change 1- import Gallery from './Gallery' ;
1+ import type { GalleryRef , GalleryProps , ImageViewerProps } from './Type' ;
2+ import type { ComponentType } from 'react' ;
23
3- export { default as ImageViewer } from './ImageViewer' ;
4- export type { GalleryRef , GalleryProps , ImageViewerProps } from './Type' ;
5- export default Gallery ;
4+ export type { GalleryRef , GalleryProps , ImageViewerProps } ;
5+
6+ import GalleryImpl from './Gallery' ;
7+ import ImageViewerImpl from './ImageViewer' ;
8+
9+ const GalleryComponent : ComponentType < GalleryProps > = GalleryImpl ;
10+ const ImageViewerComponent : ComponentType < ImageViewerProps > = ImageViewerImpl ;
11+
12+ export { ImageViewerComponent as ImageViewer } ;
13+ export default GalleryComponent ;
Original file line number Diff line number Diff line change 11{
2- "extends" : " ./tsconfig" ,
2+ "extends" : " ./tsconfig.json " ,
33 "compilerOptions" : {
44 "declaration" : true ,
55 "declarationDir" : " lib/typescript" ,
66 "emitDeclarationOnly" : true ,
7- "noEmit" : false
7+ "noEmit" : false ,
8+ "declarationMap" : true
89 },
910 "exclude" : [" **/__tests__" , " **/*.test.ts" , " example" ]
1011}
Original file line number Diff line number Diff line change 2727 "target" : " ESNext" ,
2828 "verbatimModuleSyntax" : true ,
2929 "declaration" : true ,
30- "declarationDir" : " ./lib/typescript"
30+ "declarationDir" : " ./lib/typescript" ,
31+ "declarationMap" : true
3132 },
3233 "include" : [" src" ],
3334 "exclude" : [" example" , " lib" , " node_modules" ]
You can’t perform that action at this time.
0 commit comments