Skip to content

Commit 65ecf2d

Browse files
Merge pull request #45 from developmentseed/fix/ts.d
Fix type bundling
2 parents f716081 + 9ab5e94 commit 65ecf2d

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@developmentseed/stac-react",
3-
"version": "1.0.0-alpha.1",
3+
"version": "1.0.0-alpha.2",
44
"description": "React components and hooks for building STAC-API front-ends",
55
"repository": "git@github.com:developmentseed/stac-react.git",
66
"authors": [

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ import useItem from './hooks/useItem';
55
import useStacApi from './hooks/useStacApi';
66
import { StacApiProvider } from './context';
77

8+
export * from './types/stac.d';
89
export { useCollections, useCollection, useItem, useStacSearch, useStacApi, StacApiProvider };

src/types/stac.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export type Item = {
9090
type: 'Feature';
9191
properties: GenericObject;
9292
links: Link[];
93-
assets: ItemAsset[];
93+
assets: Record<string, ItemAsset>;
9494
};
9595

9696
type Role = 'licensor' | 'producer' | 'processor' | 'host';
@@ -126,7 +126,7 @@ export type Collection = {
126126
providers: Provider[];
127127
extent: Extent;
128128
links: Link[];
129-
assets: GenericObject;
129+
assets: Record<string, ItemAsset>;
130130
};
131131

132132
export type CollectionsResponse = {

vite.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ export default defineConfig({
2020
exclude: ['**/*.test.ts'],
2121
outDir: 'dist',
2222
insertTypesEntry: true,
23+
copyDtsFiles: true,
24+
beforeWriteFile(filePath, content) {
25+
return filePath.match(/\/(vite|jest)\./) ? false : { filePath, content };
26+
},
2327
}),
2428
],
2529
});

0 commit comments

Comments
 (0)