diff --git a/types/babel-plugin-react-html-attrs/babel-plugin-react-html-attrs-tests.tsx b/types/babel-plugin-react-html-attrs/babel-plugin-react-html-attrs-tests.tsx index 522b9b43a68e00..a342734bd9f2a4 100644 --- a/types/babel-plugin-react-html-attrs/babel-plugin-react-html-attrs-tests.tsx +++ b/types/babel-plugin-react-html-attrs/babel-plugin-react-html-attrs-tests.tsx @@ -36,7 +36,19 @@ const htmlAttributesTest = ( - + + { + // $ExpectType SyntheticEvent + event; + }} + onClose={event => { + // $ExpectType SyntheticEvent + event; + }} + open + />
diff --git a/types/babel-plugin-react-html-attrs/index.d.ts b/types/babel-plugin-react-html-attrs/index.d.ts index b2c3931f9396bb..4987d700fe0ce2 100644 --- a/types/babel-plugin-react-html-attrs/index.d.ts +++ b/types/babel-plugin-react-html-attrs/index.d.ts @@ -2052,7 +2052,10 @@ declare namespace React { } interface DialogHTMLAttributes extends HTMLAttributes { - open?: boolean | string | undefined; + closedby?: "any" | "closerequest" | "none" | undefined; + onCancel?: ReactEventHandler | undefined; + onClose?: ReactEventHandler | undefined; + open?: boolean | undefined; } interface EmbedHTMLAttributes extends HTMLAttributes { diff --git a/types/express-serve-static-core/express-serve-static-core-tests.ts b/types/express-serve-static-core/express-serve-static-core-tests.ts index 85f3aea6c76ee3..62fd45e116ec61 100644 --- a/types/express-serve-static-core/express-serve-static-core-tests.ts +++ b/types/express-serve-static-core/express-serve-static-core-tests.ts @@ -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 +}); diff --git a/types/express-serve-static-core/index.d.ts b/types/express-serve-static-core/index.d.ts index 4664513ef759b0..31bbdf1ff4bc51 100644 --- a/types/express-serve-static-core/index.d.ts +++ b/types/express-serve-static-core/index.d.ts @@ -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. diff --git a/types/express-serve-static-core/package.json b/types/express-serve-static-core/package.json index 8b246601d2ce78..ec79ed235daa35 100644 --- a/types/express-serve-static-core/package.json +++ b/types/express-serve-static-core/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@types/express-serve-static-core", - "version": "5.0.9999", + "version": "5.1.9999", "projects": [ "http://expressjs.com" ], diff --git a/types/express-serve-static-core/v4/index.d.ts b/types/express-serve-static-core/v4/index.d.ts index aee3041de0bc2a..9e3d2502624a08 100644 --- a/types/express-serve-static-core/v4/index.d.ts +++ b/types/express-serve-static-core/v4/index.d.ts @@ -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. diff --git a/types/rax/index.d.ts b/types/rax/index.d.ts index 6fc4967a6c4946..ed1a5604de2f7b 100644 --- a/types/rax/index.d.ts +++ b/types/rax/index.d.ts @@ -1683,6 +1683,9 @@ declare namespace Rax { } interface DialogHTMLAttributes extends HTMLAttributes { + closedby?: "any" | "closerequest" | "none" | undefined; + onCancel?: RaxEventHandler | undefined; + onClose?: RaxEventHandler | undefined; open?: boolean | undefined; } diff --git a/types/react/index.d.ts b/types/react/index.d.ts index 5d82891b4a1bc0..00b03984285762 100644 --- a/types/react/index.d.ts +++ b/types/react/index.d.ts @@ -3036,6 +3036,7 @@ declare namespace React { } interface DialogHTMLAttributes extends HTMLAttributes { + closedby?: "any" | "closerequest" | "none" | undefined; onCancel?: ReactEventHandler | undefined; onClose?: ReactEventHandler | undefined; open?: boolean | undefined; diff --git a/types/react/test/elementAttributes.tsx b/types/react/test/elementAttributes.tsx index 469354f3e70287..22e7be732eb7ae 100644 --- a/types/react/test/elementAttributes.tsx +++ b/types/react/test/elementAttributes.tsx @@ -87,7 +87,9 @@ const testCases = [ test , + , { // $ExpectType SyntheticEvent event; @@ -96,8 +98,8 @@ const testCases = [ // $ExpectType SyntheticEvent event; }} - > - , + open + />, ,
, // Float diff --git a/types/react/ts5.0/index.d.ts b/types/react/ts5.0/index.d.ts index 3c2305eb280520..f05b815083b901 100644 --- a/types/react/ts5.0/index.d.ts +++ b/types/react/ts5.0/index.d.ts @@ -3035,6 +3035,7 @@ declare namespace React { } interface DialogHTMLAttributes extends HTMLAttributes { + closedby?: "any" | "closerequest" | "none" | undefined; onCancel?: ReactEventHandler | undefined; onClose?: ReactEventHandler | undefined; open?: boolean | undefined; diff --git a/types/react/ts5.0/test/elementAttributes.tsx b/types/react/ts5.0/test/elementAttributes.tsx index 469354f3e70287..22e7be732eb7ae 100644 --- a/types/react/ts5.0/test/elementAttributes.tsx +++ b/types/react/ts5.0/test/elementAttributes.tsx @@ -87,7 +87,9 @@ const testCases = [ test , + , { // $ExpectType SyntheticEvent event; @@ -96,8 +98,8 @@ const testCases = [ // $ExpectType SyntheticEvent event; }} - > - , + open + />, ,
, // Float diff --git a/types/react/v16/index.d.ts b/types/react/v16/index.d.ts index b6200c03ec623b..ac5eadc34935eb 100644 --- a/types/react/v16/index.d.ts +++ b/types/react/v16/index.d.ts @@ -2141,6 +2141,7 @@ declare namespace React { } interface DialogHTMLAttributes extends HTMLAttributes { + closedby?: "any" | "closerequest" | "none" | undefined; onCancel?: ReactEventHandler | undefined; onClose?: ReactEventHandler | undefined; open?: boolean | undefined; diff --git a/types/react/v16/test/elementAttributes.tsx b/types/react/v16/test/elementAttributes.tsx index 198316476d78c3..fa141fb2a6c993 100644 --- a/types/react/v16/test/elementAttributes.tsx +++ b/types/react/v16/test/elementAttributes.tsx @@ -54,7 +54,9 @@ const testCases = [ , + , { // $ExpectType SyntheticEvent event; @@ -63,8 +65,8 @@ const testCases = [ // $ExpectType SyntheticEvent event; }} - > - , + open + />, , <>