Skip to content
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

[@types/react] Remove placeholder from HTMLAttributes #67170

Merged
merged 4 commits into from
Dec 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion types/react/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1978,7 +1978,6 @@ declare namespace React {
id?: string | undefined;
lang?: string | undefined;
nonce?: string | undefined;
placeholder?: string | undefined;
slot?: string | undefined;
spellCheck?: Booleanish | undefined;
style?: CSSProperties | undefined;
Expand Down
5 changes: 5 additions & 0 deletions types/react/test/elementAttributes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ const testCases = [
<span autoFocus />,
<span className="klass" />,
<span contentEditable />,
<span
contentEditable
// @ts-expect-error -- Use data-placeholder instead.
placeholder="foo"
/>,
<span contentEditable="plaintext-only" />,
<span contextMenu="menuId" />,
<span dir="rtl" />,
Expand Down
1 change: 0 additions & 1 deletion types/react/ts5.0/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1979,7 +1979,6 @@ declare namespace React {
id?: string | undefined;
lang?: string | undefined;
nonce?: string | undefined;
placeholder?: string | undefined;
slot?: string | undefined;
spellCheck?: Booleanish | undefined;
style?: CSSProperties | undefined;
Expand Down
5 changes: 5 additions & 0 deletions types/react/ts5.0/test/elementAttributes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ const testCases = [
<span autoFocus />,
<span className="klass" />,
<span contentEditable />,
<span
contentEditable
// @ts-expect-error -- Use data-placeholder instead.
placeholder="foo"
/>,
<span contentEditable="plaintext-only" />,
<span contextMenu="menuId" />,
<span dir="rtl" />,
Expand Down