diff --git a/packages/swarmplot/index.d.ts b/packages/swarmplot/legacy/index.d.ts similarity index 100% rename from packages/swarmplot/index.d.ts rename to packages/swarmplot/legacy/index.d.ts diff --git a/packages/swarmplot/package.json b/packages/swarmplot/package.json index ba1e262b4..1841a9c43 100644 --- a/packages/swarmplot/package.json +++ b/packages/swarmplot/package.json @@ -22,11 +22,12 @@ ], "main": "./dist/nivo-swarmplot.cjs.js", "module": "./dist/nivo-swarmplot.es.js", + "typings": "./dist/types/index.d.ts", "files": [ "README.md", "LICENSE.md", - "index.d.ts", - "dist/" + "dist/", + "!dist/tsconfig.tsbuildinfo" ], "dependencies": { "@nivo/annotations": "0.70.1", diff --git a/packages/swarmplot/src/index.js b/packages/swarmplot/src/index.ts similarity index 100% rename from packages/swarmplot/src/index.js rename to packages/swarmplot/src/index.ts diff --git a/packages/swarmplot/stories/SwarmPlot.stories.js b/packages/swarmplot/stories/SwarmPlot.stories.tsx similarity index 100% rename from packages/swarmplot/stories/SwarmPlot.stories.js rename to packages/swarmplot/stories/SwarmPlot.stories.tsx diff --git a/packages/swarmplot/stories/SwarmPlotCanvas.stories.js b/packages/swarmplot/stories/SwarmPlotCanvas.stories.tsx similarity index 100% rename from packages/swarmplot/stories/SwarmPlotCanvas.stories.js rename to packages/swarmplot/stories/SwarmPlotCanvas.stories.tsx diff --git a/packages/swarmplot/stories/SwarmPlotLayers.js b/packages/swarmplot/stories/SwarmPlotLayers.tsx similarity index 100% rename from packages/swarmplot/stories/SwarmPlotLayers.js rename to packages/swarmplot/stories/SwarmPlotLayers.tsx diff --git a/packages/swarmplot/stories/SwarmPlotRenderNode.js b/packages/swarmplot/stories/SwarmPlotRenderNode.tsx similarity index 100% rename from packages/swarmplot/stories/SwarmPlotRenderNode.js rename to packages/swarmplot/stories/SwarmPlotRenderNode.tsx diff --git a/packages/swarmplot/tests/compute.test.js b/packages/swarmplot/tests/compute.test.tsx similarity index 100% rename from packages/swarmplot/tests/compute.test.js rename to packages/swarmplot/tests/compute.test.tsx diff --git a/packages/swarmplot/tsconfig.json b/packages/swarmplot/tsconfig.json new file mode 100644 index 000000000..855b4b2b7 --- /dev/null +++ b/packages/swarmplot/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig.types.json", + "compilerOptions": { + "outDir": "./dist/types", + "rootDir": "./src" + }, + "include": ["src/**/*"] +}