File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55### Patch
66
7+ - Updated dev dependencies.
78- Added missing readme “Installation” section import map instructions for [ ` is-plain-obj ` ] ( https://npm.im/is-plain-obj ) .
89- Added [ Browserslist] ( https://browsersl.ist ) links to the readme.
910
Original file line number Diff line number Diff line change 105105 "react-waterfall-render" : " ^4.0.1"
106106 },
107107 "devDependencies" : {
108- "@types/node" : " ^18.6.3 " ,
109- "@types/react" : " ^18.0.15 " ,
108+ "@types/node" : " ^18.7.13 " ,
109+ "@types/react" : " ^18.0.17 " ,
110110 "@types/react-dom" : " ^18.0.6" ,
111111 "@types/react-test-renderer" : " ^18.0.0" ,
112112 "abort-controller" : " ^3.0.0" ,
113- "coverage-node" : " ^6.1 .0" ,
114- "esbuild" : " ^0.14.53 " ,
115- "eslint" : " ^8.21 .0" ,
113+ "coverage-node" : " ^8.0 .0" ,
114+ "esbuild" : " ^0.15.5 " ,
115+ "eslint" : " ^8.23 .0" ,
116116 "eslint-plugin-react-hooks" : " ^4.6.0" ,
117117 "eslint-plugin-simple-import-sort" : " ^7.0.0" ,
118118 "event-target-shim" : " ^6.0.2" ,
123123 "react" : " ^18.2.0" ,
124124 "react-dom" : " ^18.2.0" ,
125125 "react-test-renderer" : " ^18.2.0" ,
126- "revertable-globals" : " ^3 .0.0" ,
127- "test-director" : " ^8 .0.2 " ,
128- "typescript" : " ^4.7.4 "
126+ "revertable-globals" : " ^4 .0.0" ,
127+ "test-director" : " ^10 .0.0 " ,
128+ "typescript" : " ^4.8.2 "
129129 },
130130 "scripts" : {
131131 "eslint" : " eslint ." ,
Original file line number Diff line number Diff line change @@ -4,16 +4,20 @@ if (!("CustomEvent" in globalThis))
44 globalThis . CustomEvent =
55 /**
66 * `CustomEvent` polyfill.
7- * @type {typeof globalThis.CustomEvent }
7+ * @template [T=unknown]
8+ * @type {globalThis.CustomEvent<T> }
89 */
9- class CustomEvent extends globalThis . Event {
10+ class CustomEvent extends Event {
1011 /**
1112 * @param {string } type Event type.
12- * @param {CustomEventInit } [eventInitDict ] Custom event options.
13+ * @param {CustomEventInit<T> } [options ] Custom event options.
1314 */
14- constructor ( type , { detail, ...eventOptions } = { } ) {
15+ constructor ( type , options = { } ) {
16+ // Workaround a TypeScript bug:
17+ // https://github.com/microsoft/TypeScript/issues/50286
18+ const { detail, ...eventOptions } = options ;
1519 super ( type , eventOptions ) ;
16- this . detail = detail ;
20+ if ( detail ) this . detail = detail ;
1721 }
1822
1923 /** @deprecated */
You can’t perform that action at this time.
0 commit comments