Library
React Components / v9 (@fluentui/react-components)
System Info
Are you reporting Accessibility issue?
None
Reproduction
while dts-check tool is not publicly available yet you can do following:
-
check playground
-
bump TS to 4.4 within fluent monorepo
- bump TS version to 4.4 in fluent repo
- run
yarn workspace @fluentui/react-utilities type-check
Bug Description
Actual Behavior
TS 4.4 introduced better lib.d.ts declarations which align/follow stable apis supported by real browsers https://devblogs.microsoft.com/typescript/announcing-typescript-4-4/#breaking-changes. Also new approach of how one can use custom standard lib has been introduced.
This change removed several APIs that were not supported by browsers at time of TS 4.4 release etc. one of those api is DialogElement microsoft/TypeScript-DOM-lib-generator#1029.
Based on fluent browser matrix support we cannot use native Dialog api nor types so it should be removed in order to support users and our codebase to use TS 4.4, 4.5 and 4.6.
Error log:
yarn workspace @fluentui/react-components dts --min 4.3 --max 4.9
yarn workspace v1.23.34
yarn run v1.23.34
$ /Users/martinhochel/Projects/msft/fluentui/node_modules/.bin/dts --min 4.3 --max 4.9
dts: 🧪 Checking declaration files against TS versions - from v4.3 to v4.9
dts: Checking declarations in /Users/martinhochel/Projects/msft/fluentui/packages/react-components/react-components/dist against [email protected]
dts: - index.d.ts
dts: - unstable.d.ts
dts: ✅ All good
dts: Checking declarations in /Users/martinhochel/Projects/msft/fluentui/packages/react-components/react-components/dist against [email protected]
dts: - index.d.ts
dts: - unstable.d.ts
dts: ❌ Errors found:
/Users/martinhochel/Projects/msft/fluentui/packages/react-components/react-utilities/dist/index.d.ts(244,29): error TS2344: Type 'typeof globalThis[ConstructorName]' does not satisfy the constraint 'abstract new (...args: any) => any'.
/Users/martinhochel/Projects/msft/fluentui/packages/react-components/react-utilities/dist/index.d.ts(244,29): error TS2536: Type 'ConstructorName' cannot be used to index type 'typeof globalThis'.
dts: Checking declarations in /Users/martinhochel/Projects/msft/fluentui/packages/react-components/react-components/dist against [email protected]
dts: - index.d.ts
dts: - unstable.d.ts
dts: ❌ Errors found:
error TS4124: Compiler option 'moduleResolution' of value 'nodenext' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/Users/martinhochel/Projects/msft/fluentui/packages/react-components/react-utilities/dist/index.d.ts(244,29): error TS2344: Type 'typeof globalThis[ConstructorName]' does not satisfy the constraint 'abstract new (...args: any) => any'.
/Users/martinhochel/Projects/msft/fluentui/packages/react-components/react-utilities/dist/index.d.ts(244,29): error TS2536: Type 'ConstructorName' cannot be used to index type 'typeof globalThis'.
dts: Checking declarations in /Users/martinhochel/Projects/msft/fluentui/packages/react-components/react-components/dist against [email protected]
dts: - index.d.ts
dts: - unstable.d.ts
dts: ❌ Errors found:
error TS4124: Compiler option 'moduleResolution' of value 'nodenext' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
/Users/martinhochel/Projects/msft/fluentui/packages/react-components/react-utilities/dist/index.d.ts(244,29): error TS2344: Type 'typeof globalThis[ConstructorName]' does not satisfy the constraint 'abstract new (...args: any) => any'.
/Users/martinhochel/Projects/msft/fluentui/packages/react-components/react-utilities/dist/index.d.ts(244,29): error TS2536: Type 'ConstructorName' cannot be used to index type 'typeof globalThis'.
dts: Checking declarations in /Users/martinhochel/Projects/msft/fluentui/packages/react-components/react-components/dist against [email protected]
dts: - index.d.ts
dts: - unstable.d.ts
dts: ✅ All good
dts: Checking declarations in /Users/martinhochel/Projects/msft/fluentui/packages/react-components/react-components/dist against [email protected]
dts: - index.d.ts
dts: - unstable.d.ts
dts: ✅ All good
dts: Checking declarations in /Users/martinhochel/Projects/msft/fluentui/packages/react-components/react-components/dist against [email protected]
dts: - index.d.ts
dts: - unstable.d.ts
dts: ✅ All good
error Command failed with exit code 1.
Expected Behavior
v9 ships valid types for TS 4.4 - 4.6
Logs
No response
Requested priority
Blocking
Products/sites affected
No response
Are you willing to submit a PR to fix?
yes
Validations
Library
React Components / v9 (@fluentui/react-components)
System Info
Are you reporting Accessibility issue?
None
Reproduction
while
dts-checktool is not publicly available yet you can do following:check playground
bump TS to 4.4 within fluent monorepo
yarn workspace @fluentui/react-utilities type-checkBug Description
Actual Behavior
TS 4.4 introduced better
lib.d.tsdeclarations which align/follow stable apis supported by real browsers https://devblogs.microsoft.com/typescript/announcing-typescript-4-4/#breaking-changes. Also new approach of how one can use custom standard lib has been introduced.This change removed several APIs that were not supported by browsers at time of TS 4.4 release etc. one of those api is
DialogElementmicrosoft/TypeScript-DOM-lib-generator#1029.Based on fluent browser matrix support we cannot use native Dialog api nor types so it should be removed in order to support users and our codebase to use TS 4.4, 4.5 and 4.6.
Error log:
Expected Behavior
v9 ships valid types for TS 4.4 - 4.6
Logs
No response
Requested priority
Blocking
Products/sites affected
No response
Are you willing to submit a PR to fix?
yes
Validations