-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Convert docs to typescript (#48)
* docs: Convert docs to typescript * TS improvements * Change files
- Loading branch information
Showing
25 changed files
with
485 additions
and
27 deletions.
There are no files selected for viewing
117 changes: 117 additions & 0 deletions
117
.yarn/patches/@docusaurus-theme-common-npm-2.0.0-beta.15-aaa76f45ef
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
diff --git a/lib/components/Collapsible/index.d.ts b/lib/components/Collapsible/index.d.ts | ||
index 048360eabdca9e50289ee886c7debc21ba05949a..1df99e04a6ce5c7dec39e0b198d82e9612e5388d 100644 | ||
--- a/lib/components/Collapsible/index.d.ts | ||
+++ b/lib/components/Collapsible/index.d.ts | ||
@@ -4,7 +4,7 @@ | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
-import React, { type Dispatch, type SetStateAction, type ReactNode } from 'react'; | ||
+import React, { Dispatch, SetStateAction, ReactNode } from 'react'; | ||
export declare type UseCollapsibleConfig = { | ||
initialState: boolean | (() => boolean); | ||
}; | ||
diff --git a/lib/components/Details/index.d.ts b/lib/components/Details/index.d.ts | ||
index 36a1a482ccd3dd311e02eedb0656ac19e3957bdf..944a3c453bf51aa79b3e6c5cf06d8009680d12f3 100644 | ||
--- a/lib/components/Details/index.d.ts | ||
+++ b/lib/components/Details/index.d.ts | ||
@@ -4,7 +4,7 @@ | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
-import { type ComponentProps, type ReactElement } from 'react'; | ||
+import { ComponentProps, ReactElement } from 'react'; | ||
export declare type DetailsProps = { | ||
summary?: ReactElement; | ||
} & ComponentProps<'details'>; | ||
diff --git a/lib/utils/announcementBarUtils.d.ts b/lib/utils/announcementBarUtils.d.ts | ||
index eece3b5f6bc71d0e96fb040f0264677e38e5d916..d24b6fc301644820cd471e308917d8ebca109687 100644 | ||
--- a/lib/utils/announcementBarUtils.d.ts | ||
+++ b/lib/utils/announcementBarUtils.d.ts | ||
@@ -4,7 +4,7 @@ | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
-import { type ReactNode } from 'react'; | ||
+import { ReactNode } from 'react'; | ||
export declare const AnnouncementBarDismissStorageKey = "docusaurus.announcement.dismiss"; | ||
declare type AnnouncementBarAPI = { | ||
readonly isActive: boolean; | ||
diff --git a/lib/utils/docSidebarItemsExpandedState.d.ts b/lib/utils/docSidebarItemsExpandedState.d.ts | ||
index c159b3c5a462dd3abc19d06a6d4cfe20dbb93b84..271174b4bb8d9908fcef6b4d94cf13e833bc7664 100644 | ||
--- a/lib/utils/docSidebarItemsExpandedState.d.ts | ||
+++ b/lib/utils/docSidebarItemsExpandedState.d.ts | ||
@@ -4,7 +4,7 @@ | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
-import { type ReactNode } from 'react'; | ||
+import { ReactNode } from 'react'; | ||
declare type DocSidebarItemsExpandedState = { | ||
expandedItem: number | null; | ||
setExpandedItem: (a: number | null) => void; | ||
diff --git a/lib/utils/docsPreferredVersion/useDocsPreferredVersion.d.ts b/lib/utils/docsPreferredVersion/useDocsPreferredVersion.d.ts | ||
index e8dd2309f014ddd57a1ddb4c8e9d55a4354ae725..7cf7282de02630a4a69f39359aa671c9ffb78417 100644 | ||
--- a/lib/utils/docsPreferredVersion/useDocsPreferredVersion.d.ts | ||
+++ b/lib/utils/docsPreferredVersion/useDocsPreferredVersion.d.ts | ||
@@ -5,7 +5,7 @@ | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
/// <reference types="@docusaurus/plugin-content-docs" /> | ||
-import { type GlobalVersion } from '@docusaurus/plugin-content-docs/client'; | ||
+import { GlobalVersion } from '@docusaurus/plugin-content-docs/client'; | ||
export declare function useDocsPreferredVersion(pluginId?: string | undefined): { | ||
preferredVersion: GlobalVersion | null | undefined; | ||
savePreferredVersionName: (versionName: string) => void; | ||
diff --git a/lib/utils/docsUtils.d.ts b/lib/utils/docsUtils.d.ts | ||
index c495b505d4cbac92e63e7bbf4b05d121370a7ffb..7a39a31a8c06de9af804e6d49f868da9e2ce1aeb 100644 | ||
--- a/lib/utils/docsUtils.d.ts | ||
+++ b/lib/utils/docsUtils.d.ts | ||
@@ -4,7 +4,7 @@ | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
-import { type ReactNode } from 'react'; | ||
+import { ReactNode } from 'react'; | ||
import type { PropSidebar, PropSidebarItem, PropSidebarItemCategory, PropVersionDoc, PropVersionMetadata } from '@docusaurus/plugin-content-docs'; | ||
export declare const isDocsPluginEnabled: boolean; | ||
declare const EmptyContextValue: unique symbol; | ||
diff --git a/lib/utils/mobileSecondaryMenu.d.ts b/lib/utils/mobileSecondaryMenu.d.ts | ||
index a2b62f353a1b5db60109ddc8de72ebd46bbd09d6..8bb9677c51181239dbb9c4fee63da4c7510aef2c 100644 | ||
--- a/lib/utils/mobileSecondaryMenu.d.ts | ||
+++ b/lib/utils/mobileSecondaryMenu.d.ts | ||
@@ -4,7 +4,7 @@ | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
-import { type ReactNode, type ComponentType } from 'react'; | ||
+import { ReactNode, ComponentType } from 'react'; | ||
declare type ExtraProps = { | ||
toggleSidebar: () => void; | ||
}; | ||
diff --git a/lib/utils/scrollUtils.d.ts b/lib/utils/scrollUtils.d.ts | ||
index 09f34f928666b813e863c08150b31105d988c55a..e081b4c8b8f340aab3a554807a6675876de90ba7 100644 | ||
--- a/lib/utils/scrollUtils.d.ts | ||
+++ b/lib/utils/scrollUtils.d.ts | ||
@@ -4,7 +4,7 @@ | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
-import React, { type ReactNode } from 'react'; | ||
+import React, { ReactNode } from 'react'; | ||
/** | ||
* We need a way to update the scroll position while ignoring scroll events | ||
* without affecting Navbar/BackToTop visibility | ||
diff --git a/lib/utils/tabGroupChoiceUtils.d.ts b/lib/utils/tabGroupChoiceUtils.d.ts | ||
index 31046d523f4a759749d97c4fbc422f61d4ea9336..9271b79b8e748531bc6ff87a37d5e89643270da7 100644 | ||
--- a/lib/utils/tabGroupChoiceUtils.d.ts | ||
+++ b/lib/utils/tabGroupChoiceUtils.d.ts | ||
@@ -4,7 +4,7 @@ | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
-import { type ReactNode } from 'react'; | ||
+import { ReactNode } from 'react'; | ||
declare type TabGroupChoiceContextValue = { | ||
readonly tabGroupChoices: { | ||
readonly [groupId: string]: string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
import { makeStyles } from '@griffel/core'; | ||
//@ts-check | ||
import { makeStyles, shorthands } from '@griffel/core'; | ||
|
||
export default makeStyles({ | ||
root: { | ||
backgroundColor: 'red', | ||
paddingLeft: '10px', | ||
'@media(forced-colors: active):': { | ||
borderColor: 'transparent', | ||
...shorthands.borderColor('transparent'), | ||
}, | ||
}, | ||
}); |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,17 @@ | ||
{ | ||
"extends": "@tsconfig/docusaurus/tsconfig.json", | ||
"extends": "../../tsconfig.base.json", | ||
"compilerOptions": { | ||
"baseUrl": "." | ||
} | ||
"allowJs": true, | ||
"allowSyntheticDefaultImports": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"jsx": "react", | ||
"outDir": "../../dist/out-tsc", | ||
"strict": true, | ||
"noImplicitOverride": true, | ||
"noPropertyAccessFromIndexSignature": true, | ||
"noImplicitReturns": true, | ||
"noFallthroughCasesInSwitch": true | ||
}, | ||
"types": ["environment", "static-assets", "@docusaurus/module-type-aliases", "@docusaurus/theme-classic"], | ||
"include": ["./src/**/*.ts", "./src/**/*.tsx", "./src/**/*.js"] | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@griffel-babel-preset-1550fea4-75fd-4e1d-91be-6f6e354c48f9.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "Enable pretty type-check output", | ||
"packageName": "@griffel/babel-preset", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@griffel-core-f4f7d8d2-fbb4-4c0d-8015-01fcd065b460.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "Enable pretty type-check output", | ||
"packageName": "@griffel/core", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@griffel-jest-serializer-7f3bf76b-121c-44f2-92c9-bf38d52a4202.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "Enable pretty type-check output", | ||
"packageName": "@griffel/jest-serializer", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@griffel-react-392971f5-c184-48b0-82b9-d33deadbcf1c.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "Enable pretty type-check output", | ||
"packageName": "@griffel/react", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@griffel-webpack-loader-e5e40d4f-97fb-457c-b2cc-121c898ad1ea.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "Enable pretty type-check output", | ||
"packageName": "@griffel/webpack-loader", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,7 @@ | |
"@babel/preset-typescript": "7.12.13", | ||
"@codesandbox/sandpack-react": "0.13.15", | ||
"@docusaurus/core": "2.0.0-beta.15", | ||
"@docusaurus/module-type-aliases": "^2.0.0-beta.15", | ||
"@docusaurus/preset-classic": "2.0.0-beta.15", | ||
"@fluentui/bundle-size": "^1.1.4", | ||
"@nrwl/cli": "13.4.5", | ||
|
@@ -45,8 +46,10 @@ | |
"@testing-library/jest-dom": "5.16.1", | ||
"@testing-library/react": "12.1.2", | ||
"@testing-library/react-hooks": "7.0.2", | ||
"@tsconfig/docusaurus": "^1.0.4", | ||
"@types/babel__helper-plugin-utils": "7.10.0", | ||
"@types/jest": "27.0.2", | ||
"@types/js-beautify": "^1.13.3", | ||
"@types/loader-utils": "2.0.3", | ||
"@types/node": "14.14.33", | ||
"@types/react": "17.0.30", | ||
|
@@ -67,6 +70,7 @@ | |
"eslint-plugin-react-hooks": "4.2.0", | ||
"highlight.js": "11.4.0", | ||
"jest": "27.2.3", | ||
"js-beautify": "^1.14.0", | ||
"nano-staged": "0.5.0", | ||
"prettier": "2.3.1", | ||
"prism-react-renderer": "1.2.1", | ||
|
@@ -99,6 +103,7 @@ | |
"resolutions": { | ||
"@nrwl/web": "patch:@nrwl/web@npm:13.4.5#.yarn/patches/@nrwl-web-npm-13.4.5-d7e9ea40d2", | ||
"@nrwl/workspace": "patch:@nrwl/workspace@npm:13.4.5#.yarn/patches/@nrwl-workspace-npm-13.4.5-233a3ec85c", | ||
"beachball": "patch:beachball@npm:2.21.0#.yarn/patches/beachball-npm-2.21.0-85c8ba3d6b" | ||
"beachball": "patch:beachball@npm:2.21.0#.yarn/patches/beachball-npm-2.21.0-85c8ba3d6b", | ||
"@docusaurus/[email protected]": "patch:@docusaurus/theme-common@npm:2.0.0-beta.15#.yarn/patches/@docusaurus-theme-common-npm-2.0.0-beta.15-aaa76f45ef" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.