From dfbf5d9cb5a2135d11ab49c390969105c4d8da9e Mon Sep 17 00:00:00 2001 From: Emilio Martinez Date: Mon, 24 Jun 2019 12:30:42 -0700 Subject: [PATCH] Addon-knobs: straight rename js => ts This commit simply transitions the files from js to ts to make the commit history clearer afterwards. Expected not to type-check. --- addons/knobs/package.json | 2 +- addons/knobs/src/{KnobManager.js => KnobManager.ts} | 0 addons/knobs/src/{KnobStore.js => KnobStore.ts} | 0 addons/knobs/src/components/{Panel.js => Panel.tsx} | 0 .../src/components/{PropForm.js => PropForm.tsx} | 0 .../src/components/types/{Array.js => Array.tsx} | 0 .../components/types/{Boolean.js => Boolean.tsx} | 0 .../src/components/types/{Button.js => Button.tsx} | 0 .../types/{Checkboxes.js => Checkboxes.tsx} | 0 .../src/components/types/{Color.js => Color.tsx} | 0 .../src/components/types/{Date.js => Date.tsx} | 0 .../src/components/types/{Files.js => Files.tsx} | 0 .../src/components/types/{Number.js => Number.tsx} | 0 .../src/components/types/{Object.js => Object.tsx} | 0 .../components/types/{Options.js => Options.tsx} | 0 .../src/components/types/{Radio.js => Radio.tsx} | 0 .../src/components/types/{Select.js => Select.tsx} | 0 .../src/components/types/{Text.js => Text.tsx} | 0 .../src/components/types/{index.js => index.ts} | 0 addons/knobs/src/{converters.js => converters.ts} | 0 addons/knobs/src/{index.js => index.ts} | 0 addons/knobs/src/{register.js => register.tsx} | 0 .../src/{registerKnobs.js => registerKnobs.ts} | 0 addons/knobs/src/{shared.js => shared.ts} | 0 addons/knobs/tsconfig.json | 13 +++++++++++++ 25 files changed, 14 insertions(+), 1 deletion(-) rename addons/knobs/src/{KnobManager.js => KnobManager.ts} (100%) rename addons/knobs/src/{KnobStore.js => KnobStore.ts} (100%) rename addons/knobs/src/components/{Panel.js => Panel.tsx} (100%) rename addons/knobs/src/components/{PropForm.js => PropForm.tsx} (100%) rename addons/knobs/src/components/types/{Array.js => Array.tsx} (100%) rename addons/knobs/src/components/types/{Boolean.js => Boolean.tsx} (100%) rename addons/knobs/src/components/types/{Button.js => Button.tsx} (100%) rename addons/knobs/src/components/types/{Checkboxes.js => Checkboxes.tsx} (100%) rename addons/knobs/src/components/types/{Color.js => Color.tsx} (100%) rename addons/knobs/src/components/types/{Date.js => Date.tsx} (100%) rename addons/knobs/src/components/types/{Files.js => Files.tsx} (100%) rename addons/knobs/src/components/types/{Number.js => Number.tsx} (100%) rename addons/knobs/src/components/types/{Object.js => Object.tsx} (100%) rename addons/knobs/src/components/types/{Options.js => Options.tsx} (100%) rename addons/knobs/src/components/types/{Radio.js => Radio.tsx} (100%) rename addons/knobs/src/components/types/{Select.js => Select.tsx} (100%) rename addons/knobs/src/components/types/{Text.js => Text.tsx} (100%) rename addons/knobs/src/components/types/{index.js => index.ts} (100%) rename addons/knobs/src/{converters.js => converters.ts} (100%) rename addons/knobs/src/{index.js => index.ts} (100%) rename addons/knobs/src/{register.js => register.tsx} (100%) rename addons/knobs/src/{registerKnobs.js => registerKnobs.ts} (100%) rename addons/knobs/src/{shared.js => shared.ts} (100%) create mode 100644 addons/knobs/tsconfig.json diff --git a/addons/knobs/package.json b/addons/knobs/package.json index 0a8f478bc7f..c743cb42ffe 100644 --- a/addons/knobs/package.json +++ b/addons/knobs/package.json @@ -17,7 +17,7 @@ }, "license": "MIT", "main": "dist/index.js", - "jsnext:main": "src/index.js", + "types": "dist/index.d.ts", "scripts": { "prepare": "node ../../scripts/prepare.js" }, diff --git a/addons/knobs/src/KnobManager.js b/addons/knobs/src/KnobManager.ts similarity index 100% rename from addons/knobs/src/KnobManager.js rename to addons/knobs/src/KnobManager.ts diff --git a/addons/knobs/src/KnobStore.js b/addons/knobs/src/KnobStore.ts similarity index 100% rename from addons/knobs/src/KnobStore.js rename to addons/knobs/src/KnobStore.ts diff --git a/addons/knobs/src/components/Panel.js b/addons/knobs/src/components/Panel.tsx similarity index 100% rename from addons/knobs/src/components/Panel.js rename to addons/knobs/src/components/Panel.tsx diff --git a/addons/knobs/src/components/PropForm.js b/addons/knobs/src/components/PropForm.tsx similarity index 100% rename from addons/knobs/src/components/PropForm.js rename to addons/knobs/src/components/PropForm.tsx diff --git a/addons/knobs/src/components/types/Array.js b/addons/knobs/src/components/types/Array.tsx similarity index 100% rename from addons/knobs/src/components/types/Array.js rename to addons/knobs/src/components/types/Array.tsx diff --git a/addons/knobs/src/components/types/Boolean.js b/addons/knobs/src/components/types/Boolean.tsx similarity index 100% rename from addons/knobs/src/components/types/Boolean.js rename to addons/knobs/src/components/types/Boolean.tsx diff --git a/addons/knobs/src/components/types/Button.js b/addons/knobs/src/components/types/Button.tsx similarity index 100% rename from addons/knobs/src/components/types/Button.js rename to addons/knobs/src/components/types/Button.tsx diff --git a/addons/knobs/src/components/types/Checkboxes.js b/addons/knobs/src/components/types/Checkboxes.tsx similarity index 100% rename from addons/knobs/src/components/types/Checkboxes.js rename to addons/knobs/src/components/types/Checkboxes.tsx diff --git a/addons/knobs/src/components/types/Color.js b/addons/knobs/src/components/types/Color.tsx similarity index 100% rename from addons/knobs/src/components/types/Color.js rename to addons/knobs/src/components/types/Color.tsx diff --git a/addons/knobs/src/components/types/Date.js b/addons/knobs/src/components/types/Date.tsx similarity index 100% rename from addons/knobs/src/components/types/Date.js rename to addons/knobs/src/components/types/Date.tsx diff --git a/addons/knobs/src/components/types/Files.js b/addons/knobs/src/components/types/Files.tsx similarity index 100% rename from addons/knobs/src/components/types/Files.js rename to addons/knobs/src/components/types/Files.tsx diff --git a/addons/knobs/src/components/types/Number.js b/addons/knobs/src/components/types/Number.tsx similarity index 100% rename from addons/knobs/src/components/types/Number.js rename to addons/knobs/src/components/types/Number.tsx diff --git a/addons/knobs/src/components/types/Object.js b/addons/knobs/src/components/types/Object.tsx similarity index 100% rename from addons/knobs/src/components/types/Object.js rename to addons/knobs/src/components/types/Object.tsx diff --git a/addons/knobs/src/components/types/Options.js b/addons/knobs/src/components/types/Options.tsx similarity index 100% rename from addons/knobs/src/components/types/Options.js rename to addons/knobs/src/components/types/Options.tsx diff --git a/addons/knobs/src/components/types/Radio.js b/addons/knobs/src/components/types/Radio.tsx similarity index 100% rename from addons/knobs/src/components/types/Radio.js rename to addons/knobs/src/components/types/Radio.tsx diff --git a/addons/knobs/src/components/types/Select.js b/addons/knobs/src/components/types/Select.tsx similarity index 100% rename from addons/knobs/src/components/types/Select.js rename to addons/knobs/src/components/types/Select.tsx diff --git a/addons/knobs/src/components/types/Text.js b/addons/knobs/src/components/types/Text.tsx similarity index 100% rename from addons/knobs/src/components/types/Text.js rename to addons/knobs/src/components/types/Text.tsx diff --git a/addons/knobs/src/components/types/index.js b/addons/knobs/src/components/types/index.ts similarity index 100% rename from addons/knobs/src/components/types/index.js rename to addons/knobs/src/components/types/index.ts diff --git a/addons/knobs/src/converters.js b/addons/knobs/src/converters.ts similarity index 100% rename from addons/knobs/src/converters.js rename to addons/knobs/src/converters.ts diff --git a/addons/knobs/src/index.js b/addons/knobs/src/index.ts similarity index 100% rename from addons/knobs/src/index.js rename to addons/knobs/src/index.ts diff --git a/addons/knobs/src/register.js b/addons/knobs/src/register.tsx similarity index 100% rename from addons/knobs/src/register.js rename to addons/knobs/src/register.tsx diff --git a/addons/knobs/src/registerKnobs.js b/addons/knobs/src/registerKnobs.ts similarity index 100% rename from addons/knobs/src/registerKnobs.js rename to addons/knobs/src/registerKnobs.ts diff --git a/addons/knobs/src/shared.js b/addons/knobs/src/shared.ts similarity index 100% rename from addons/knobs/src/shared.js rename to addons/knobs/src/shared.ts diff --git a/addons/knobs/tsconfig.json b/addons/knobs/tsconfig.json new file mode 100644 index 00000000000..8876bb6737a --- /dev/null +++ b/addons/knobs/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "rootDir": "./src", + "types": ["webpack-env"] + }, + "include": [ + "src/**/*" + ], + "exclude": [ + "src/__tests__/**/*" + ] +}