Add type definitions

Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
This commit is contained in:
Charles de Dreuille
2024-10-20 21:46:13 +01:00
parent e1e133f741
commit 3a376168b7
4 changed files with 126 additions and 17 deletions
+8
View File
@@ -9,4 +9,12 @@ module.exports = {
es6: true,
node: true,
},
overrides: [
{
files: ['*.d.ts'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: ['plugin:@typescript-eslint/recommended'],
},
],
};
+9
View File
@@ -0,0 +1,9 @@
import type {
Meta as StorybookMeta,
StoryObj as StorybookStoryObj,
} from '@storybook/react';
declare module 'backstage-storybook' {
export type Meta<T> = StorybookMeta<T>;
export type StoryObj<T> = StorybookStoryObj<T>;
}
+5
View File
@@ -5,6 +5,7 @@
"private": true,
"type": "module",
"main": "index.mjs",
"types": "index.d.ts",
"scripts": {
"build-storybook": "storybook build --output-dir dist",
"storybook": "storybook dev -p 6006"
@@ -24,7 +25,11 @@
"@storybook/react": "^8.3.5",
"@storybook/react-vite": "^8.3.5",
"@storybook/test": "^8.3.5",
"@storybook/types": "^8.3.5",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.0.0",
"eslint": "^9.11.1",
"eslint-plugin-storybook": "^0.9.0",
"globals": "^15.9.0",
+104 -17
View File
@@ -581,7 +581,7 @@ __metadata:
languageName: node
linkType: hard
"@eslint-community/regexpp@npm:^4.10.0, @eslint-community/regexpp@npm:^4.11.0":
"@eslint-community/regexpp@npm:^4.10.0, @eslint-community/regexpp@npm:^4.11.0, @eslint-community/regexpp@npm:^4.4.0":
version: 4.11.1
resolution: "@eslint-community/regexpp@npm:4.11.1"
checksum: 6986685529d30e33c2640973c3d8e7ddd31bef3cc8cb10ad54ddc1dea12680779a2c23a45562aa1462c488137a3570e672d122fac7da22d82294382d915cec70
@@ -1404,6 +1404,15 @@ __metadata:
languageName: node
linkType: hard
"@storybook/types@npm:^8.3.5":
version: 8.3.6
resolution: "@storybook/types@npm:8.3.6"
peerDependencies:
storybook: ^8.3.6
checksum: 7122388d848cf1d8b7d95c81b8a601d82a455d764f7a625372f344dc0402bbd398db22e1c6cedd66ca3987d61b0f8204ff757e0ff5fc2a77745094dc7b882a2a
languageName: node
linkType: hard
"@testing-library/dom@npm:10.4.0":
version: 10.4.0
resolution: "@testing-library/dom@npm:10.4.0"
@@ -1661,7 +1670,16 @@ __metadata:
languageName: node
linkType: hard
"@types/react@npm:^16.8.0 || ^17.0.0 || ^18.0.0, @types/react@npm:^18.0.0":
"@types/react-dom@npm:^18.0.0":
version: 18.3.1
resolution: "@types/react-dom@npm:18.3.1"
dependencies:
"@types/react": "*"
checksum: ad28ecce3915d30dc76adc2a1373fda1745ba429cea290e16c6628df9a05fd80b6403c8e87d78b45e6c60e51df7a67add389ab62b90070fbfdc9bda8307d9953
languageName: node
linkType: hard
"@types/react@npm:*, @types/react@npm:^16.8.0 || ^17.0.0 || ^18.0.0, @types/react@npm:^18.0.0":
version: 18.3.11
resolution: "@types/react@npm:18.3.11"
dependencies:
@@ -1743,6 +1761,30 @@ __metadata:
languageName: node
linkType: hard
"@typescript-eslint/eslint-plugin@npm:^5.0.0":
version: 5.62.0
resolution: "@typescript-eslint/eslint-plugin@npm:5.62.0"
dependencies:
"@eslint-community/regexpp": ^4.4.0
"@typescript-eslint/scope-manager": 5.62.0
"@typescript-eslint/type-utils": 5.62.0
"@typescript-eslint/utils": 5.62.0
debug: ^4.3.4
graphemer: ^1.4.0
ignore: ^5.2.0
natural-compare-lite: ^1.4.0
semver: ^7.3.7
tsutils: ^3.21.0
peerDependencies:
"@typescript-eslint/parser": ^5.0.0
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
peerDependenciesMeta:
typescript:
optional: true
checksum: fc104b389c768f9fa7d45a48c86d5c1ad522c1d0512943e782a56b1e3096b2cbcc1eea3fcc590647bf0658eef61aac35120a9c6daf979bf629ad2956deb516a1
languageName: node
linkType: hard
"@typescript-eslint/parser@npm:8.10.0":
version: 8.10.0
resolution: "@typescript-eslint/parser@npm:8.10.0"
@@ -1761,6 +1803,23 @@ __metadata:
languageName: node
linkType: hard
"@typescript-eslint/parser@npm:^5.0.0":
version: 5.62.0
resolution: "@typescript-eslint/parser@npm:5.62.0"
dependencies:
"@typescript-eslint/scope-manager": 5.62.0
"@typescript-eslint/types": 5.62.0
"@typescript-eslint/typescript-estree": 5.62.0
debug: ^4.3.4
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
peerDependenciesMeta:
typescript:
optional: true
checksum: d168f4c7f21a7a63f47002e2d319bcbb6173597af5c60c1cf2de046b46c76b4930a093619e69faf2d30214c29ab27b54dcf1efc7046a6a6bd6f37f59a990e752
languageName: node
linkType: hard
"@typescript-eslint/scope-manager@npm:5.62.0":
version: 5.62.0
resolution: "@typescript-eslint/scope-manager@npm:5.62.0"
@@ -1781,6 +1840,23 @@ __metadata:
languageName: node
linkType: hard
"@typescript-eslint/type-utils@npm:5.62.0":
version: 5.62.0
resolution: "@typescript-eslint/type-utils@npm:5.62.0"
dependencies:
"@typescript-eslint/typescript-estree": 5.62.0
"@typescript-eslint/utils": 5.62.0
debug: ^4.3.4
tsutils: ^3.21.0
peerDependencies:
eslint: "*"
peerDependenciesMeta:
typescript:
optional: true
checksum: fc41eece5f315dfda14320be0da78d3a971d650ea41300be7196934b9715f3fe1120a80207551eb71d39568275dbbcf359bde540d1ca1439d8be15e9885d2739
languageName: node
linkType: hard
"@typescript-eslint/type-utils@npm:8.10.0":
version: 8.10.0
resolution: "@typescript-eslint/type-utils@npm:8.10.0"
@@ -1847,21 +1923,7 @@ __metadata:
languageName: node
linkType: hard
"@typescript-eslint/utils@npm:8.10.0":
version: 8.10.0
resolution: "@typescript-eslint/utils@npm:8.10.0"
dependencies:
"@eslint-community/eslint-utils": ^4.4.0
"@typescript-eslint/scope-manager": 8.10.0
"@typescript-eslint/types": 8.10.0
"@typescript-eslint/typescript-estree": 8.10.0
peerDependencies:
eslint: ^8.57.0 || ^9.0.0
checksum: db67603baacba9cccbbc625801a44e5320bc558be846646ff9962818c64a9ab07edcfdcad98b15a3f8954d3e398e3a41f085c1ec458f7169a1ce7b3674032d59
languageName: node
linkType: hard
"@typescript-eslint/utils@npm:^5.62.0":
"@typescript-eslint/utils@npm:5.62.0, @typescript-eslint/utils@npm:^5.62.0":
version: 5.62.0
resolution: "@typescript-eslint/utils@npm:5.62.0"
dependencies:
@@ -1879,6 +1941,20 @@ __metadata:
languageName: node
linkType: hard
"@typescript-eslint/utils@npm:8.10.0":
version: 8.10.0
resolution: "@typescript-eslint/utils@npm:8.10.0"
dependencies:
"@eslint-community/eslint-utils": ^4.4.0
"@typescript-eslint/scope-manager": 8.10.0
"@typescript-eslint/types": 8.10.0
"@typescript-eslint/typescript-estree": 8.10.0
peerDependencies:
eslint: ^8.57.0 || ^9.0.0
checksum: db67603baacba9cccbbc625801a44e5320bc558be846646ff9962818c64a9ab07edcfdcad98b15a3f8954d3e398e3a41f085c1ec458f7169a1ce7b3674032d59
languageName: node
linkType: hard
"@typescript-eslint/visitor-keys@npm:5.62.0":
version: 5.62.0
resolution: "@typescript-eslint/visitor-keys@npm:5.62.0"
@@ -2171,7 +2247,11 @@ __metadata:
"@storybook/react": ^8.3.5
"@storybook/react-vite": ^8.3.5
"@storybook/test": ^8.3.5
"@storybook/types": ^8.3.5
"@types/react": ^18.0.0
"@types/react-dom": ^18.0.0
"@typescript-eslint/eslint-plugin": ^5.0.0
"@typescript-eslint/parser": ^5.0.0
eslint: ^9.11.1
eslint-plugin-storybook: ^0.9.0
globals: ^15.9.0
@@ -4355,6 +4435,13 @@ __metadata:
languageName: node
linkType: hard
"natural-compare-lite@npm:^1.4.0":
version: 1.4.0
resolution: "natural-compare-lite@npm:1.4.0"
checksum: 5222ac3986a2b78dd6069ac62cbb52a7bf8ffc90d972ab76dfe7b01892485d229530ed20d0c62e79a6b363a663b273db3bde195a1358ce9e5f779d4453887225
languageName: node
linkType: hard
"natural-compare@npm:^1.4.0":
version: 1.4.0
resolution: "natural-compare@npm:1.4.0"