Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,19 @@ const htmlAttributesTest = (

<del datetime="test" />

<dialog open="" />
<dialog />
<dialog
closedby="closerequest"
onCancel={event => {
// $ExpectType SyntheticEvent<HTMLDialogElement, Event>
event;
}}
onClose={event => {
// $ExpectType SyntheticEvent<HTMLDialogElement, Event>
event;
}}
open
/>

<fieldset disabled="" />

Expand Down
5 changes: 4 additions & 1 deletion types/babel-plugin-react-html-attrs/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2052,7 +2052,10 @@ declare namespace React {
}

interface DialogHTMLAttributes<T> extends HTMLAttributes<T> {
open?: boolean | string | undefined;
closedby?: "any" | "closerequest" | "none" | undefined;
onCancel?: ReactEventHandler<T> | undefined;
onClose?: ReactEventHandler<T> | undefined;
open?: boolean | undefined;
}

interface EmbedHTMLAttributes<T> extends HTMLAttributes<T> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,3 +349,7 @@ app.get("/async", Promise.resolve);

// Starting with Express 5, app.router is the app's in-built instance of router
app.router.stack;

app.on("mount", (app) => {
app; // $ExpectType Application<Record<string,any>
});
2 changes: 1 addition & 1 deletion types/express-serve-static-core/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1230,7 +1230,7 @@ export interface Application<
* - Not inherit the value of settings that have a default value. You must set the value in the sub-app.
* - Inherit the value of settings with no default value.
*/
on: (event: string, callback: (parent: Application) => void) => this;
on: (event: "mount", callback: (parent: Application) => void) => this;

/**
* The app.mountpath property contains one or more path patterns on which a sub-app was mounted.
Expand Down
2 changes: 1 addition & 1 deletion types/express-serve-static-core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@types/express-serve-static-core",
"version": "5.0.9999",
"version": "5.1.9999",
"projects": [
"http://expressjs.com"
],
Expand Down
2 changes: 1 addition & 1 deletion types/express-serve-static-core/v4/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1281,7 +1281,7 @@ export interface Application<
* - Not inherit the value of settings that have a default value. You must set the value in the sub-app.
* - Inherit the value of settings with no default value.
*/
on: (event: string, callback: (parent: Application) => void) => this;
on: (event: "mount", callback: (parent: Application) => void) => this;

/**
* The app.mountpath property contains one or more path patterns on which a sub-app was mounted.
Expand Down
3 changes: 3 additions & 0 deletions types/rax/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1683,6 +1683,9 @@ declare namespace Rax {
}

interface DialogHTMLAttributes<T> extends HTMLAttributes<T> {
closedby?: "any" | "closerequest" | "none" | undefined;
onCancel?: RaxEventHandler<T> | undefined;
onClose?: RaxEventHandler<T> | undefined;
open?: boolean | undefined;
}

Expand Down
1 change: 1 addition & 0 deletions types/react/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3036,6 +3036,7 @@ declare namespace React {
}

interface DialogHTMLAttributes<T> extends HTMLAttributes<T> {
closedby?: "any" | "closerequest" | "none" | undefined;
onCancel?: ReactEventHandler<T> | undefined;
onClose?: ReactEventHandler<T> | undefined;
open?: boolean | undefined;
Expand Down
6 changes: 4 additions & 2 deletions types/react/test/elementAttributes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ const testCases = [
<source media="test" srcSet="test" width={50} height={50} />
<img alt="test" src="test" width={100} height={100} fetchPriority="auto" />
</picture>,
<dialog />,
<dialog
closedby="closerequest"
onCancel={event => {
// $ExpectType SyntheticEvent<HTMLDialogElement, Event>
event;
Expand All @@ -96,8 +98,8 @@ const testCases = [
// $ExpectType SyntheticEvent<HTMLDialogElement, Event>
event;
}}
>
</dialog>,
open
/>,
<link nonce="8IBTHwOdqNKAWeKl7plt8g==" />,
<center></center>,
// Float
Expand Down
1 change: 1 addition & 0 deletions types/react/ts5.0/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3035,6 +3035,7 @@ declare namespace React {
}

interface DialogHTMLAttributes<T> extends HTMLAttributes<T> {
closedby?: "any" | "closerequest" | "none" | undefined;
onCancel?: ReactEventHandler<T> | undefined;
onClose?: ReactEventHandler<T> | undefined;
open?: boolean | undefined;
Expand Down
6 changes: 4 additions & 2 deletions types/react/ts5.0/test/elementAttributes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ const testCases = [
<source media="test" srcSet="test" width={50} height={50} />
<img alt="test" src="test" width={100} height={100} fetchPriority="auto" />
</picture>,
<dialog />,
<dialog
closedby="closerequest"
onCancel={event => {
// $ExpectType SyntheticEvent<HTMLDialogElement, Event>
event;
Expand All @@ -96,8 +98,8 @@ const testCases = [
// $ExpectType SyntheticEvent<HTMLDialogElement, Event>
event;
}}
>
</dialog>,
open
/>,
<link nonce="8IBTHwOdqNKAWeKl7plt8g==" />,
<center></center>,
// Float
Expand Down
1 change: 1 addition & 0 deletions types/react/v16/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2141,6 +2141,7 @@ declare namespace React {
}

interface DialogHTMLAttributes<T> extends HTMLAttributes<T> {
closedby?: "any" | "closerequest" | "none" | undefined;
onCancel?: ReactEventHandler<T> | undefined;
onClose?: ReactEventHandler<T> | undefined;
open?: boolean | undefined;
Expand Down
6 changes: 4 additions & 2 deletions types/react/v16/test/elementAttributes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ const testCases = [
<source media="test" srcSet="test" width={50} height={50} />
<img src="test" width={100} height={100} />
</picture>,
<dialog />,
<dialog
closedby="closerequest"
onCancel={event => {
// $ExpectType SyntheticEvent<HTMLDialogElement, Event>
event;
Expand All @@ -63,8 +65,8 @@ const testCases = [
// $ExpectType SyntheticEvent<HTMLDialogElement, Event>
event;
}}
>
</dialog>,
open
/>,
<link nonce="8IBTHwOdqNKAWeKl7plt8g==" />,
<>
<template>
Expand Down
1 change: 1 addition & 0 deletions types/react/v17/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2166,6 +2166,7 @@ declare namespace React {
}

interface DialogHTMLAttributes<T> extends HTMLAttributes<T> {
closedby?: "any" | "closerequest" | "none" | undefined;
onCancel?: ReactEventHandler<T> | undefined;
onClose?: ReactEventHandler<T> | undefined;
open?: boolean | undefined;
Expand Down
6 changes: 4 additions & 2 deletions types/react/v17/test/elementAttributes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ const testCases = [
<source media="test" srcSet="test" width={50} height={50} />
<img src="test" width={100} height={100} />
</picture>,
<dialog />,
<dialog
closedby="closerequest"
onCancel={event => {
// $ExpectType SyntheticEvent<HTMLDialogElement, Event>
event;
Expand All @@ -78,8 +80,8 @@ const testCases = [
// $ExpectType SyntheticEvent<HTMLDialogElement, Event>
event;
}}
>
</dialog>,
open
/>,
<link nonce="8IBTHwOdqNKAWeKl7plt8g==" />,
<>
<template>
Expand Down
1 change: 1 addition & 0 deletions types/react/v18/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3205,6 +3205,7 @@ declare namespace React {
}

interface DialogHTMLAttributes<T> extends HTMLAttributes<T> {
closedby?: "any" | "closerequest" | "none" | undefined;
onCancel?: ReactEventHandler<T> | undefined;
onClose?: ReactEventHandler<T> | undefined;
open?: boolean | undefined;
Expand Down
6 changes: 4 additions & 2 deletions types/react/v18/test/elementAttributes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ const testCases = [
<source media="test" srcSet="test" width={50} height={50} />
<img alt="test" src="test" width={100} height={100} fetchPriority="auto" />
</picture>,
<dialog />,
<dialog
closedby="closerequest"
onCancel={event => {
// $ExpectType SyntheticEvent<HTMLDialogElement, Event>
event;
Expand All @@ -103,8 +105,8 @@ const testCases = [
// $ExpectType SyntheticEvent<HTMLDialogElement, Event>
event;
}}
>
</dialog>,
open
/>,
<link nonce="8IBTHwOdqNKAWeKl7plt8g==" />,
<center></center>,
<>
Expand Down
1 change: 1 addition & 0 deletions types/react/v18/ts5.0/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3206,6 +3206,7 @@ declare namespace React {
}

interface DialogHTMLAttributes<T> extends HTMLAttributes<T> {
closedby?: "any" | "closerequest" | "none" | undefined;
onCancel?: ReactEventHandler<T> | undefined;
onClose?: ReactEventHandler<T> | undefined;
open?: boolean | undefined;
Expand Down
6 changes: 4 additions & 2 deletions types/react/v18/ts5.0/test/elementAttributes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ const testCases = [
<source media="test" srcSet="test" width={50} height={50} />
<img alt="test" src="test" width={100} height={100} fetchPriority="auto" />
</picture>,
<dialog />,
<dialog
closedby="closerequest"
onCancel={event => {
// $ExpectType SyntheticEvent<HTMLDialogElement, Event>
event;
Expand All @@ -96,8 +98,8 @@ const testCases = [
// $ExpectType SyntheticEvent<HTMLDialogElement, Event>
event;
}}
>
</dialog>,
open
/>,
<link nonce="8IBTHwOdqNKAWeKl7plt8g==" />,
<center></center>,
<>
Expand Down
4 changes: 0 additions & 4 deletions types/webpack-hot-middleware/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@
"name": "Chris Abrams",
"githubUsername": "chrisabrams"
},
{
"name": "Ilya Zelenko",
"githubUsername": "iliyaZelenko"
},
{
"name": "Rodrigo Saboya",
"githubUsername": "saboya"
Expand Down