Skip to content

Drop PropertyDescriptor type arguments that the upcoming non-generic builtin rejects - #59814

Merged
meta-codesync[bot] merged 1 commit into
mainfrom
export-D129956546
Nov 5, 2026
Merged

meta-codesync[bot] merged 1 commit into
mainfrom
export-D129956546

Conversation

@SamChou19815

Copy link
Copy Markdown
Member

Summary:
Flow's builtin PropertyDescriptor<T = unknown> is becoming non-generic, as in TypeScript's lib.es5.d.ts: its value, get and set use any, and Object.getOwnPropertyDescriptor no longer takes a type argument. The new builtins reject PropertyDescriptor<X> annotations and Object.getOwnPropertyDescriptor<X>(...) calls.

Remove those type arguments. Today's Flow accepts all of these sites without them.

Nothing changes at runtime.

Changelog: [Internal] Drop PropertyDescriptor type arguments.

Differential Revision: D129956546

…c builtin rejects

Summary:
Flow's builtin `PropertyDescriptor<T = unknown>` is becoming non-generic, as in TypeScript's `lib.es5.d.ts`: its `value`, `get` and `set` use `any`, and `Object.getOwnPropertyDescriptor` no longer takes a type argument. The new builtins reject `PropertyDescriptor<X>` annotations and `Object.getOwnPropertyDescriptor<X>(...)` calls.

Remove those type arguments. Today's Flow accepts all of these sites without them.

Nothing changes at runtime.

Changelog: [Internal] Drop `PropertyDescriptor` type arguments.

Differential Revision: D129956546
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 5, 2026
@meta-codesync

meta-codesync Bot commented Nov 5, 2026

Copy link
Copy Markdown

@SamChou19815 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D129956546.

@facebook-github-tools facebook-github-tools Bot added p: Facebook Partner: Facebook Partner labels Nov 5, 2026
@meta-codesync
meta-codesync Bot merged commit 4a851dd into main Nov 5, 2026
59 of 61 checks passed
@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @SamChou19815 in 4a851dd

When will my fix make it into a release? | How to file a pick request?

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. Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants