Skip to content

Fix generated types base on __typetests__ #51317

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

coado
Copy link
Contributor

@coado coado commented May 14, 2025

Summary:
This diff is a set of alignments/improvements in generated TS types. It includes:

  • extending AppStateStatus with extension and unknown,
  • exporting AnimatedProps under Animated namespace,
  • resolving issue with discriminated unions in ProgressBarAndroidTypes,
  • fixing StyleSheet.create type to accept only specified style properties,
  • extending TextProps with AccessibilityProps,
  • extending Fn Args generic with $ReadOnlyArray in ErrorUtils,
  • small __typetests__ adjustments,
  • removing type test styleDimensionValueValidAnimated as DimensionValue no longer accepts AnimatedNode,
  • removing styleDimensionValueInvalid as DimensionValue accepts any string now - template literal types in Flow are not supported,
  • changing overlayColor type to ColorValue to align with manual types,
  • fixing AnimatedPropsAllowlist type which wasn't correct in TS because index signature type was different from style type,
  • using DeviceEventEmitter instead of DeviceEventEmitterStatic in type tests which is equivalent in both new and old types - DeviceEventEmitterStatic was only a type of DeviceEventEmitter,
  • removing type test for checking forwarded key type - doesn't work with new types and that shouldn't be supported,
  • removing Animated.legacyRef type test - not included in new types,
  • adding DOMRect from "dom" lib to globals.d.ts to not include "dom" lib in the tsconfig - tries to compare globals with lib.dom.d.ts and produces many errors,
  • exporting SectionListData,
  • bumping @definitelytyped/dtslint to 0.0.178 version which removes testNoTsIgnore check here

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D74246304

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Software Mansion Partner: Software Mansion Partner labels May 14, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D74246304

@coado coado force-pushed the export-D74246304 branch from e89b78e to d6707e2 Compare May 15, 2025 07:33
coado added a commit to coado/react-native that referenced this pull request May 15, 2025
Summary:

This diff is a set of alignments/improvements in generated TS types. It includes:

- extending `AppStateStatus` with `extension` and `unknown`,
- exporting `AnimatedProps` under Animated namespace,
- resolving issue with discriminated unions in `ProgressBarAndroidTypes`,
- fixing `StyleSheet.create` type to accept only specified style properties,
- extending `TextProps` with `AccessibilityProps`,
- extending Fn `Args` generic with `$ReadOnlyArray` in `ErrorUtils`,
- small `__typetests__` adjustments
- removing type test `styleDimensionValueValidAnimated` as `DimensionValue` no longer accepts `AnimatedNode` 
- removing `styleDimensionValueInvalid` as `DimensionValue` accepts any string now - template literal types in Flow are not supported
- changing `overlayColor` type to `ColorValue` to align with manual types
- fixing `AnimatedPropsAllowlist` type which wasn't correct in TS because index signature type was different from style type.
- using `DeviceEventEmitter` instead of `DeviceEventEmitterStatic` in type tests which is equivalent in both new and old types - `DeviceEventEmitterStatic` was only a type of `DeviceEventEmitter`
- removing type test for checking forwarded key type - doesn't work with new types and that shouldn't be supported.
- removing `Animated.legacyRef` type test - not included in new types
- adding `DOMRect` from "dom" lib to globals.d.ts to not include "dom" lib in the tsconfig - tries to compare globals with lib.dom.d.ts and produces many errors.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D74246304
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D74246304

coado added a commit to coado/react-native that referenced this pull request May 15, 2025
Summary:

This diff is a set of alignments/improvements in generated TS types. It includes:

- extending `AppStateStatus` with `extension` and `unknown`,
- exporting `AnimatedProps` under Animated namespace,
- resolving issue with discriminated unions in `ProgressBarAndroidTypes`,
- fixing `StyleSheet.create` type to accept only specified style properties,
- extending `TextProps` with `AccessibilityProps`,
- extending Fn `Args` generic with `$ReadOnlyArray` in `ErrorUtils`,
- small `__typetests__` adjustments,
- removing type test `styleDimensionValueValidAnimated` as `DimensionValue` no longer accepts `AnimatedNode` ,
- removing `styleDimensionValueInvalid` as `DimensionValue` accepts any string now - template literal types in Flow are not supported,
- changing `overlayColor` type to `ColorValue` to align with manual types,
- fixing `AnimatedPropsAllowlist` type which wasn't correct in TS because index signature type was different from style type,
- using `DeviceEventEmitter` instead of `DeviceEventEmitterStatic` in type tests which is equivalent in both new and old types - `DeviceEventEmitterStatic` was only a type of `DeviceEventEmitter`,
- removing type test for checking forwarded key type - doesn't work with new types and that shouldn't be supported,
- removing `Animated.legacyRef` type test - not included in new types,
- adding `DOMRect` from "dom" lib to globals.d.ts to not include "dom" lib in the tsconfig - tries to compare globals with lib.dom.d.ts and produces many errors,
- exporting `SectionListData` 

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D74246304
@coado coado force-pushed the export-D74246304 branch from d6707e2 to 7e49b29 Compare May 15, 2025 08:25
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D74246304

coado added a commit to coado/react-native that referenced this pull request May 15, 2025
Summary:

This diff is a set of alignments/improvements in generated TS types. It includes:

- extending `AppStateStatus` with `extension` and `unknown`,
- exporting `AnimatedProps` under Animated namespace,
- resolving issue with discriminated unions in `ProgressBarAndroidTypes`,
- fixing `StyleSheet.create` type to accept only specified style properties,
- extending `TextProps` with `AccessibilityProps`,
- extending Fn `Args` generic with `$ReadOnlyArray` in `ErrorUtils`,
- small `__typetests__` adjustments,
- removing type test `styleDimensionValueValidAnimated` as `DimensionValue` no longer accepts `AnimatedNode` ,
- removing `styleDimensionValueInvalid` as `DimensionValue` accepts any string now - template literal types in Flow are not supported,
- changing `overlayColor` type to `ColorValue` to align with manual types,
- fixing `AnimatedPropsAllowlist` type which wasn't correct in TS because index signature type was different from style type,
- using `DeviceEventEmitter` instead of `DeviceEventEmitterStatic` in type tests which is equivalent in both new and old types - `DeviceEventEmitterStatic` was only a type of `DeviceEventEmitter`,
- removing type test for checking forwarded key type - doesn't work with new types and that shouldn't be supported,
- removing `Animated.legacyRef` type test - not included in new types,
- adding `DOMRect` from "dom" lib to globals.d.ts to not include "dom" lib in the tsconfig - tries to compare globals with lib.dom.d.ts and produces many errors,
- exporting `SectionListData` 

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D74246304
@coado coado force-pushed the export-D74246304 branch from 7e49b29 to 50b33e5 Compare May 15, 2025 08:27
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D74246304

coado added a commit to coado/react-native that referenced this pull request May 15, 2025
Summary:

This diff is a set of alignments/improvements in generated TS types. It includes:

- extending `AppStateStatus` with `extension` and `unknown`,
- exporting `AnimatedProps` under Animated namespace,
- resolving issue with discriminated unions in `ProgressBarAndroidTypes`,
- fixing `StyleSheet.create` type to accept only specified style properties,
- extending `TextProps` with `AccessibilityProps`,
- extending Fn `Args` generic with `$ReadOnlyArray` in `ErrorUtils`,
- small `__typetests__` adjustments,
- removing type test `styleDimensionValueValidAnimated` as `DimensionValue` no longer accepts `AnimatedNode` ,
- removing `styleDimensionValueInvalid` as `DimensionValue` accepts any string now - template literal types in Flow are not supported,
- changing `overlayColor` type to `ColorValue` to align with manual types,
- fixing `AnimatedPropsAllowlist` type which wasn't correct in TS because index signature type was different from style type,
- using `DeviceEventEmitter` instead of `DeviceEventEmitterStatic` in type tests which is equivalent in both new and old types - `DeviceEventEmitterStatic` was only a type of `DeviceEventEmitter`,
- removing type test for checking forwarded key type - doesn't work with new types and that shouldn't be supported,
- removing `Animated.legacyRef` type test - not included in new types,
- adding `DOMRect` from "dom" lib to globals.d.ts to not include "dom" lib in the tsconfig - tries to compare globals with lib.dom.d.ts and produces many errors,
- exporting `SectionListData` ,
- bumping `definitelytyped/dtslint` to 0.0.178 version which removes `testNoTsIgnore` check [here](microsoft/DefinitelyTyped-tools@0e0838a)

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D74246304
@coado coado force-pushed the export-D74246304 branch from 50b33e5 to a722b2c Compare May 15, 2025 10:06
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D74246304

coado added a commit to coado/react-native that referenced this pull request May 15, 2025
Summary:

This diff is a set of alignments/improvements in generated TS types. It includes:

- extending `AppStateStatus` with `extension` and `unknown`,
- exporting `AnimatedProps` under Animated namespace,
- resolving issue with discriminated unions in `ProgressBarAndroidTypes`,
- fixing `StyleSheet.create` type to accept only specified style properties,
- extending `TextProps` with `AccessibilityProps`,
- extending Fn `Args` generic with `$ReadOnlyArray` in `ErrorUtils`,
- small `__typetests__` adjustments,
- removing type test `styleDimensionValueValidAnimated` as `DimensionValue` no longer accepts `AnimatedNode` ,
- removing `styleDimensionValueInvalid` as `DimensionValue` accepts any string now - template literal types in Flow are not supported,
- changing `overlayColor` type to `ColorValue` to align with manual types,
- fixing `AnimatedPropsAllowlist` type which wasn't correct in TS because index signature type was different from style type,
- using `DeviceEventEmitter` instead of `DeviceEventEmitterStatic` in type tests which is equivalent in both new and old types - `DeviceEventEmitterStatic` was only a type of `DeviceEventEmitter`,
- removing type test for checking forwarded key type - doesn't work with new types and that shouldn't be supported,
- removing `Animated.legacyRef` type test - not included in new types,
- adding `DOMRect` from "dom" lib to globals.d.ts to not include "dom" lib in the tsconfig - tries to compare globals with lib.dom.d.ts and produces many errors,
- exporting `SectionListData` ,
- bumping `definitelytyped/dtslint` to 0.0.178 version which removes `testNoTsIgnore` check [here](microsoft/DefinitelyTyped-tools@0e0838a)

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D74246304
@coado coado force-pushed the export-D74246304 branch from a722b2c to 3e60486 Compare May 15, 2025 13:38
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D74246304

coado added a commit to coado/react-native that referenced this pull request May 15, 2025
Summary:
Pull Request resolved: facebook#51317

This diff is a set of alignments/improvements in generated TS types. It includes:

- extending `AppStateStatus` with `extension` and `unknown`,
- exporting `AnimatedProps` under Animated namespace,
- resolving issue with discriminated unions in `ProgressBarAndroidTypes`,
- fixing `StyleSheet.create` type to accept only specified style properties,
- extending `TextProps` with `AccessibilityProps`,
- extending Fn `Args` generic with `$ReadOnlyArray` in `ErrorUtils`,
- small `__typetests__` adjustments,
- removing type test `styleDimensionValueValidAnimated` as `DimensionValue` no longer accepts `AnimatedNode` ,
- removing `styleDimensionValueInvalid` as `DimensionValue` accepts any string now - template literal types in Flow are not supported,
- changing `overlayColor` type to `ColorValue` to align with manual types,
- fixing `AnimatedPropsAllowlist` type which wasn't correct in TS because index signature type was different from style type,
- using `DeviceEventEmitter` instead of `DeviceEventEmitterStatic` in type tests which is equivalent in both new and old types - `DeviceEventEmitterStatic` was only a type of `DeviceEventEmitter`,
- removing type test for checking forwarded key type - doesn't work with new types and that shouldn't be supported,
- removing `Animated.legacyRef` type test - not included in new types,
- adding `DOMRect` from "dom" lib to globals.d.ts to not include "dom" lib in the tsconfig - tries to compare globals with lib.dom.d.ts and produces many errors,
- exporting `SectionListData` ,
- bumping `definitelytyped/dtslint` to 0.0.178 version which removes `testNoTsIgnore` check [here](microsoft/DefinitelyTyped-tools@0e0838a)

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D74246304
@coado coado force-pushed the export-D74246304 branch from 3e60486 to d3ed135 Compare May 15, 2025 13:42
coado added a commit to coado/react-native that referenced this pull request May 15, 2025
Summary:

This diff is a set of alignments/improvements in generated TS types. It includes:

- extending `AppStateStatus` with `extension` and `unknown`,
- exporting `AnimatedProps` under Animated namespace,
- resolving issue with discriminated unions in `ProgressBarAndroidTypes`,
- fixing `StyleSheet.create` type to accept only specified style properties,
- extending `TextProps` with `AccessibilityProps`,
- extending Fn `Args` generic with `$ReadOnlyArray` in `ErrorUtils`,
- small `__typetests__` adjustments,
- removing type test `styleDimensionValueValidAnimated` as `DimensionValue` no longer accepts `AnimatedNode` ,
- removing `styleDimensionValueInvalid` as `DimensionValue` accepts any string now - template literal types in Flow are not supported,
- changing `overlayColor` type to `ColorValue` to align with manual types,
- fixing `AnimatedPropsAllowlist` type which wasn't correct in TS because index signature type was different from style type,
- using `DeviceEventEmitter` instead of `DeviceEventEmitterStatic` in type tests which is equivalent in both new and old types - `DeviceEventEmitterStatic` was only a type of `DeviceEventEmitter`,
- removing type test for checking forwarded key type - doesn't work with new types and that shouldn't be supported,
- removing `Animated.legacyRef` type test - not included in new types,
- adding `DOMRect` from "dom" lib to globals.d.ts to not include "dom" lib in the tsconfig - tries to compare globals with lib.dom.d.ts and produces many errors,
- exporting `SectionListData` ,
- bumping `definitelytyped/dtslint` to 0.0.178 version which removes `testNoTsIgnore` check [here](microsoft/DefinitelyTyped-tools@0e0838a)

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D74246304
@coado coado force-pushed the export-D74246304 branch from d3ed135 to 0259d3c Compare May 15, 2025 14:23
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D74246304

@coado coado force-pushed the export-D74246304 branch from 0259d3c to 6f0f9aa Compare May 15, 2025 15:29
coado added a commit to coado/react-native that referenced this pull request May 15, 2025
Summary:

This diff is a set of alignments/improvements in generated TS types. It includes:

- extending `AppStateStatus` with `extension` and `unknown`,
- exporting `AnimatedProps` under Animated namespace,
- resolving issue with discriminated unions in `ProgressBarAndroidTypes`,
- fixing `StyleSheet.create` type to accept only specified style properties,
- extending `TextProps` with `AccessibilityProps`,
- extending Fn `Args` generic with `$ReadOnlyArray` in `ErrorUtils`,
- small `__typetests__` adjustments,
- removing type test `styleDimensionValueValidAnimated` as `DimensionValue` no longer accepts `AnimatedNode` ,
- removing `styleDimensionValueInvalid` as `DimensionValue` accepts any string now - template literal types in Flow are not supported,
- changing `overlayColor` type to `ColorValue` to align with manual types,
- fixing `AnimatedPropsAllowlist` type which wasn't correct in TS because index signature type was different from style type,
- using `DeviceEventEmitter` instead of `DeviceEventEmitterStatic` in type tests which is equivalent in both new and old types - `DeviceEventEmitterStatic` was only a type of `DeviceEventEmitter`,
- removing type test for checking forwarded key type - doesn't work with new types and that shouldn't be supported,
- removing `Animated.legacyRef` type test - not included in new types,
- adding `DOMRect` from "dom" lib to globals.d.ts to not include "dom" lib in the tsconfig - tries to compare globals with lib.dom.d.ts and produces many errors,
- exporting `SectionListData` ,
- bumping `definitelytyped/dtslint` to 0.0.178 version which removes `testNoTsIgnore` check [here](microsoft/DefinitelyTyped-tools@0e0838a)

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D74246304
Summary:
Pull Request resolved: facebook#51317

This diff is a set of alignments/improvements in generated TS types. It includes:

- extending `AppStateStatus` with `extension` and `unknown`,
- exporting `AnimatedProps` under Animated namespace,
- resolving issue with discriminated unions in `ProgressBarAndroidTypes`,
- fixing `StyleSheet.create` type to accept only specified style properties,
- extending `TextProps` with `AccessibilityProps`,
- extending Fn `Args` generic with `$ReadOnlyArray` in `ErrorUtils`,
- small `__typetests__` adjustments,
- removing type test `styleDimensionValueValidAnimated` as `DimensionValue` no longer accepts `AnimatedNode` ,
- removing `styleDimensionValueInvalid` as `DimensionValue` accepts any string now - template literal types in Flow are not supported,
- changing `overlayColor` type to `ColorValue` to align with manual types,
- fixing `AnimatedPropsAllowlist` type which wasn't correct in TS because index signature type was different from style type,
- using `DeviceEventEmitter` instead of `DeviceEventEmitterStatic` in type tests which is equivalent in both new and old types - `DeviceEventEmitterStatic` was only a type of `DeviceEventEmitter`,
- removing type test for checking forwarded key type - doesn't work with new types and that shouldn't be supported,
- removing `Animated.legacyRef` type test - not included in new types,
- adding `DOMRect` from "dom" lib to globals.d.ts to not include "dom" lib in the tsconfig - tries to compare globals with lib.dom.d.ts and produces many errors,
- exporting `SectionListData` ,
- bumping `definitelytyped/dtslint` to 0.0.178 version which removes `testNoTsIgnore` check [here](microsoft/DefinitelyTyped-tools@0e0838a)

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D74246304
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D74246304

@coado coado force-pushed the export-D74246304 branch from 6f0f9aa to 3af5c38 Compare May 15, 2025 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported p: Facebook Partner: Facebook p: Software Mansion Partner: Software Mansion Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants