"prettier": "1.19.1",
"react-test-renderer": "16.8.5",
"remark": "11.0.2",
- "typescript": "4.6.3",
+ "typescript": "4.8.4",
"unist-util-visit": "2.0.2"
},
"scripts": {
languageName: node
linkType: hard
+"@babel/helper-string-parser@npm:^7.19.4":
+ version: 7.19.4
+ resolution: "@babel/helper-string-parser@npm:7.19.4"
+ checksum: b2f8a3920b30dfac81ec282ac4ad9598ea170648f8254b10f475abe6d944808fb006aab325d3eb5a8ad3bea8dfa888cfa6ef471050dae5748497c110ec060943
+ languageName: node
+ linkType: hard
+
"@babel/helper-validator-identifier@npm:^7.10.4":
version: 7.10.4
resolution: "@babel/helper-validator-identifier@npm:7.10.4"
languageName: node
linkType: hard
+"@babel/helper-validator-identifier@npm:^7.19.1":
+ version: 7.19.1
+ resolution: "@babel/helper-validator-identifier@npm:7.19.1"
+ checksum: 0eca5e86a729162af569b46c6c41a63e18b43dbe09fda1d2a3c8924f7d617116af39cac5e4cd5d431bb760b4dca3c0970e0c444789b1db42bcf1fa41fbad0a3a
+ languageName: node
+ linkType: hard
+
"@babel/helper-validator-option@npm:^7.16.7":
version: 7.16.7
resolution: "@babel/helper-validator-option@npm:7.16.7"
languageName: node
linkType: hard
+"@babel/types@npm:^7.15.4":
+ version: 7.19.4
+ resolution: "@babel/types@npm:7.19.4"
+ dependencies:
+ "@babel/helper-string-parser": ^7.19.4
+ "@babel/helper-validator-identifier": ^7.19.1
+ to-fast-properties: ^2.0.0
+ checksum: 4032f6407093f80dd4f4764be676f7527d2a5c0381586967cd79683cf8af01cdc16745a381b9cef045f702f0c9b0dffd880d84ee55dad59ba01bd23d5d52a8e0
+ languageName: node
+ linkType: hard
+
"@babel/types@npm:^7.16.7, @babel/types@npm:^7.17.0, @babel/types@npm:^7.3.3":
version: 7.17.0
resolution: "@babel/types@npm:7.17.0"
languageName: node
linkType: hard
+"fs-extra@npm:^10.1.0":
+ version: 10.1.0
+ resolution: "fs-extra@npm:10.1.0"
+ dependencies:
+ graceful-fs: ^4.2.0
+ jsonfile: ^6.0.1
+ universalify: ^2.0.0
+ checksum: dc94ab37096f813cc3ca12f0f1b5ad6744dfed9ed21e953d72530d103cea193c2f81584a39e9dee1bea36de5ee66805678c0dddc048e8af1427ac19c00fffc50
+ languageName: node
+ linkType: hard
+
"fs-extra@npm:^8.1.0":
version: 8.1.0
resolution: "fs-extra@npm:8.1.0"
react-typography: 0.16.20
rehype-react: 6.1.0
remark: 11.0.2
- typescript: 4.6.3
+ typescript: 4.8.4
typography: 0.16.21
unist-util-visit: 2.0.2
languageName: unknown
languageName: node
linkType: hard
-"typescript@npm:4.6.3":
- version: 4.6.3
- resolution: "typescript@npm:4.6.3"
+"typescript@npm:4.8.4":
+ version: 4.8.4
+ resolution: "typescript@npm:4.8.4"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
- checksum: 255bb26c8cb846ca689dd1c3a56587af4f69055907aa2c154796ea28ee0dea871535b1c78f85a6212c77f2657843a269c3a742d09d81495b97b914bf7920415b
+ checksum: 3e4f061658e0c8f36c820802fa809e0fd812b85687a9a2f5430bc3d0368e37d1c9605c3ce9b39df9a05af2ece67b1d844f9f6ea8ff42819f13bcb80f85629af0
languageName: node
linkType: hard
-"typescript@patch:typescript@4.6.3#~builtin<compat/typescript>":
- version: 4.6.3
- resolution: "typescript@patch:typescript@npm%3A4.6.3#~builtin<compat/typescript>::version=4.6.3&hash=bda367"
+"typescript@patch:typescript@4.8.4#~builtin<compat/typescript>":
+ version: 4.8.4
+ resolution: "typescript@patch:typescript@npm%3A4.8.4#~builtin<compat/typescript>::version=4.8.4&hash=701156"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
- checksum: 6bf45caf847062420592e711bc9c28bf5f9a9a7fa8245343b81493e4ededae33f1774009d1234d911422d1646a2c839f44e1a23ecb111b40a60ac2ea4c1482a8
+ checksum: 301459fc3eb3b1a38fe91bf96d98eb55da88a9cb17b4ef80b4d105d620f4d547ba776cc27b44cc2ef58b66eda23fe0a74142feb5e79a6fb99f54fc018a696afa
languageName: node
linkType: hard
"prettier": "1.19.1",
"react-select-event": "5.5.1",
"testing-library-selector": "0.2.1",
- "typescript": "4.6.3",
+ "typescript": "4.8.4",
"whatwg-fetch": "3.6.2"
},
"resolutions": {
return <div {...props.innerProps}>×</div>;
}
-export type SelectOptionProps<T, IsMulti extends boolean> = OptionProps<T, IsMulti>;
+export type SelectOptionProps<T extends OptionTypeBase, IsMulti extends boolean> = OptionProps<
+ T,
+ IsMulti
+>;
export const SelectOption = components.Option;
/* Keeping it as a class to simplify a dozen tests */
export default class Select<
- Option,
+ Option extends OptionTypeBase,
IsMulti extends boolean = false,
Group extends GroupTypeBase<Option> = GroupTypeBase<Option>
> extends React.Component<NamedProps<Option, IsMulti, Group> & StyleExtensionProps> {
}
export function CreatableSelect<
- Option,
+ Option extends OptionTypeBase,
isMulti extends boolean,
Group extends GroupTypeBase<Option> = GroupTypeBase<Option>
>(props: AsyncCreatableProps<Option, isMulti, Group>) {
}
export function SearchSelect<
- Option,
+ Option extends OptionTypeBase,
IsMulti extends boolean,
Group extends GroupTypeBase<Option> = GroupTypeBase<Option>
>(props: NamedProps<Option, IsMulti, Group> & AsyncProps<Option, Group> & StyleExtensionProps) {
);
}
-export function selectStyle<Option, IsMulti extends boolean, Group extends GroupTypeBase<Option>>(
+export function selectStyle<
+ Option extends OptionTypeBase,
+ IsMulti extends boolean,
+ Group extends GroupTypeBase<Option>
+>(
props?: NamedProps<Option, IsMulti, Group> & AsyncProps<Option, Group> & StyleExtensionProps
): StylesConfig<Option, IsMulti, Group> {
return {
*/
import { shallow } from 'enzyme';
import * as React from 'react';
-import { components, GroupTypeBase, InputProps, Props as ReactSelectProps } from 'react-select';
+import {
+ components,
+ GroupTypeBase,
+ InputProps,
+ OptionTypeBase,
+ Props as ReactSelectProps
+} from 'react-select';
import { LoadingIndicatorProps } from 'react-select/src/components/indicators';
import { MultiValueRemoveProps } from 'react-select/src/components/MultiValue';
import { mockReactSelectIndicatorProps } from '../../../helpers/mocks/react-select';
});
function shallowRender<
- Option,
+ Option extends OptionTypeBase,
IsMulti extends boolean = false,
Group extends GroupTypeBase<Option> = GroupTypeBase<Option>
>(props: Partial<ReactSelectProps<Option, IsMulti, Group>> = {}) {
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ControlProps, GroupTypeBase, IndicatorProps, InputProps, OptionProps } from 'react-select';
+import {
+ ControlProps,
+ GroupTypeBase,
+ IndicatorProps,
+ InputProps,
+ OptionProps,
+ OptionTypeBase
+} from 'react-select';
export function mockReactSelectOptionProps<
- OptionType,
+ OptionType extends OptionTypeBase,
IsMulti extends boolean,
GroupType extends GroupTypeBase<OptionType> = GroupTypeBase<OptionType>
>(
}
export function mockReactSelectControlProps<
- OptionType,
+ OptionType extends OptionTypeBase,
IsMulti extends boolean,
GroupType extends GroupTypeBase<OptionType> = GroupTypeBase<OptionType>
>(): ControlProps<OptionType, IsMulti, GroupType> {
}
export function mockReactSelectIndicatorProps<
- OptionType,
+ OptionType extends OptionTypeBase,
IsMulti extends boolean,
GroupType extends GroupTypeBase<OptionType> = GroupTypeBase<OptionType>
>(_option: OptionType): IndicatorProps<OptionType, IsMulti, GroupType> {
}
export function serializeDate(value?: Date, serializer = toNotSoISOString): string | undefined {
- if (value != null && value.toISOString) {
+ if (value != null) {
return serializer(value);
}
return undefined;
remark-react: 7.0.1
remark-rehype: 6.0.0
testing-library-selector: 0.2.1
- typescript: 4.6.3
+ typescript: 4.8.4
unist-util-visit: 2.0.2
valid-url: 1.0.9
whatwg-fetch: 3.6.2
languageName: node
linkType: hard
-"typescript@npm:4.6.3":
- version: 4.6.3
- resolution: "typescript@npm:4.6.3"
+"typescript@npm:4.8.4":
+ version: 4.8.4
+ resolution: "typescript@npm:4.8.4"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
- checksum: 255bb26c8cb846ca689dd1c3a56587af4f69055907aa2c154796ea28ee0dea871535b1c78f85a6212c77f2657843a269c3a742d09d81495b97b914bf7920415b
+ checksum: 3e4f061658e0c8f36c820802fa809e0fd812b85687a9a2f5430bc3d0368e37d1c9605c3ce9b39df9a05af2ece67b1d844f9f6ea8ff42819f13bcb80f85629af0
languageName: node
linkType: hard
-"typescript@patch:typescript@4.6.3#~builtin<compat/typescript>":
- version: 4.6.3
- resolution: "typescript@patch:typescript@npm%3A4.6.3#~builtin<compat/typescript>::version=4.6.3&hash=701156"
+"typescript@patch:typescript@4.8.4#~builtin<compat/typescript>":
+ version: 4.8.4
+ resolution: "typescript@patch:typescript@npm%3A4.8.4#~builtin<compat/typescript>::version=4.8.4&hash=701156"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
- checksum: 6bf45caf847062420592e711bc9c28bf5f9a9a7fa8245343b81493e4ededae33f1774009d1234d911422d1646a2c839f44e1a23ecb111b40a60ac2ea4c1482a8
+ checksum: 301459fc3eb3b1a38fe91bf96d98eb55da88a9cb17b4ef80b4d105d620f4d547ba776cc27b44cc2ef58b66eda23fe0a74142feb5e79a6fb99f54fc018a696afa
languageName: node
linkType: hard