chore(deps): bump typescript to 4.8.4 (#24272)

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
This commit is contained in:
Jan Suleiman 2024-01-29 17:14:24 +01:00 committed by GitHub
parent f73760a5d1
commit 29582e8d86
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 31 additions and 20 deletions

View File

@ -267,7 +267,7 @@
"thread-loader": "^3.0.4",
"transform-loader": "^0.2.4",
"ts-loader": "^9.4.4",
"typescript": "^4.5.4",
"typescript": "^4.8.4",
"vm-browserify": "^1.1.2",
"webpack": "^5.88.1",
"webpack-bundle-analyzer": "^4.9.0",
@ -62004,9 +62004,9 @@
}
},
"node_modules/typescript": {
"version": "4.5.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.4.tgz",
"integrity": "sha512-VgYs2A2QIRuGphtzFV7aQJduJ2gyfTljngLzjpfW9FoYZF6xuw1W0vW9ghCKLfcWrCFxK81CSGRAvS1pn4fIUg==",
"version": "4.8.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz",
"integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==",
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
@ -118904,9 +118904,9 @@
}
},
"typescript": {
"version": "4.5.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.4.tgz",
"integrity": "sha512-VgYs2A2QIRuGphtzFV7aQJduJ2gyfTljngLzjpfW9FoYZF6xuw1W0vW9ghCKLfcWrCFxK81CSGRAvS1pn4fIUg=="
"version": "4.8.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz",
"integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ=="
},
"ua-parser-js": {
"version": "0.7.33",

View File

@ -334,7 +334,7 @@
"thread-loader": "^3.0.4",
"transform-loader": "^0.2.4",
"ts-loader": "^9.4.4",
"typescript": "^4.5.4",
"typescript": "^4.8.4",
"vm-browserify": "^1.1.2",
"webpack": "^5.88.1",
"webpack-bundle-analyzer": "^4.9.0",

View File

@ -33,9 +33,10 @@ export interface LoadableRenderer<Props>
extends React.ComponentClass<Props & LoadableRendererProps>,
Loadable.LoadableComponent {}
export default function createLoadableRenderer<Props, Exports>(
options: Loadable.OptionsWithMap<Props, Exports>,
): LoadableRenderer<Props> {
export default function createLoadableRenderer<
Props,
Exports extends { [key: string]: any },
>(options: Loadable.OptionsWithMap<Props, Exports>): LoadableRenderer<Props> {
const LoadableRenderer = Loadable.Map(options) as LoadableRenderer<Props>;
// Extends the behavior of LoadableComponent to provide post-render listeners

View File

@ -112,13 +112,13 @@ export default function makeApi<
endpoint,
};
if (requestType === 'search') {
requestConfig.searchParams = payload;
requestConfig.searchParams = payload as SupersetPayload;
} else if (requestType === 'rison') {
requestConfig.endpoint = `${endpoint}?q=${rison.encode(payload)}`;
} else if (requestType === 'form') {
requestConfig.postPayload = payload;
requestConfig.postPayload = payload as SupersetPayload;
} else {
requestConfig.jsonPayload = payload;
requestConfig.jsonPayload = payload as SupersetPayload;
}
let result: JsonValue | Response;

View File

@ -175,7 +175,10 @@ export class Switchboard {
/**
* Defines a method that can be "called" from the other side by sending an event.
*/
defineMethod<A = any, R = any>(methodName: string, executor: Method<A, R>) {
defineMethod<A extends {} = any, R = any>(
methodName: string,
executor: Method<A, R>,
) {
this.methods[methodName] = executor;
}

View File

@ -350,6 +350,7 @@ function useInstance<D extends object>(instance: TableInstance<D>) {
);
const useStickyWrap = (renderer: TableRenderer) => {
// @ts-ignore
const { width, height } =
useMountedMemo(getTableSize, [getTableSize]) || sticky;
// only change of data should trigger re-render

View File

@ -189,7 +189,7 @@ const config: ControlPanelConfig = {
},
],
[
hasGenericChartAxes && isAggMode
hasGenericChartAxes
? {
name: 'time_grain_sqla',
config: {
@ -217,7 +217,7 @@ const config: ControlPanelConfig = {
},
}
: null,
hasGenericChartAxes && isAggMode ? 'temporal_columns_lookup' : null,
hasGenericChartAxes ? 'temporal_columns_lookup' : null,
],
[
{

View File

@ -16,6 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
import { isNil } from 'lodash';
export default function extent<T = number | string | Date | undefined | null>(
values: T[],
) {
@ -24,16 +27,16 @@ export default function extent<T = number | string | Date | undefined | null>(
// eslint-disable-next-line no-restricted-syntax
for (const value of values) {
if (value !== null) {
if (min === undefined) {
if (isNil(min)) {
if (value !== undefined) {
min = value;
max = value;
}
} else {
} else if (value !== undefined) {
if (min > value) {
min = value;
}
if (max !== undefined) {
if (!isNil(max)) {
if (max < value) {
max = value;
}

View File

@ -158,6 +158,7 @@ class WordCloud extends React.PureComponent<
update() {
const { data, encoding } = this.props;
// @ts-ignore
const encoder = this.createEncoder(encoding);
encoder.setDomainFromDataset(data);
@ -221,6 +222,7 @@ class WordCloud extends React.PureComponent<
const { width, height, encoding, sliceId } = this.props;
const { words } = this.state;
// @ts-ignore
const encoder = this.createEncoder(encoding);
encoder.channels.color.setDomainFromDataset(words);

View File

@ -261,6 +261,7 @@ const CustomModal = ({
if (React.isValidElement(footer)) {
// If a footer component is provided inject a closeModal function
// so the footer can provide a "close" button if desired
// @ts-ignore
FooterComponent = React.cloneElement(footer, { closeModal: onHide });
}
const modalFooter = isNil(FooterComponent)