Skip to content

Commit cde1b95

Browse files
jansulevillebro
authored andcommitted
chore(deps): bump typescript to 4.8.4 (apache#24272)
Co-authored-by: Ville Brofeldt <[email protected]>
1 parent 393b39d commit cde1b95

File tree

10 files changed

+31
-20
lines changed

10 files changed

+31
-20
lines changed

superset-frontend/package-lock.json

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

superset-frontend/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@
334334
"thread-loader": "^3.0.4",
335335
"transform-loader": "^0.2.4",
336336
"ts-loader": "^9.4.4",
337-
"typescript": "^4.5.4",
337+
"typescript": "^4.8.4",
338338
"vm-browserify": "^1.1.2",
339339
"webpack": "^5.88.1",
340340
"webpack-bundle-analyzer": "^4.9.0",

superset-frontend/packages/superset-ui-core/src/chart/components/createLoadableRenderer.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@ export interface LoadableRenderer<Props>
3333
extends React.ComponentClass<Props & LoadableRendererProps>,
3434
Loadable.LoadableComponent {}
3535

36-
export default function createLoadableRenderer<Props, Exports>(
37-
options: Loadable.OptionsWithMap<Props, Exports>,
38-
): LoadableRenderer<Props> {
36+
export default function createLoadableRenderer<
37+
Props,
38+
Exports extends { [key: string]: any },
39+
>(options: Loadable.OptionsWithMap<Props, Exports>): LoadableRenderer<Props> {
3940
const LoadableRenderer = Loadable.Map(options) as LoadableRenderer<Props>;
4041

4142
// Extends the behavior of LoadableComponent to provide post-render listeners

superset-frontend/packages/superset-ui-core/src/query/api/v1/makeApi.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,13 @@ export default function makeApi<
112112
endpoint,
113113
};
114114
if (requestType === 'search') {
115-
requestConfig.searchParams = payload;
115+
requestConfig.searchParams = payload as SupersetPayload;
116116
} else if (requestType === 'rison') {
117117
requestConfig.endpoint = `${endpoint}?q=${rison.encode(payload)}`;
118118
} else if (requestType === 'form') {
119-
requestConfig.postPayload = payload;
119+
requestConfig.postPayload = payload as SupersetPayload;
120120
} else {
121-
requestConfig.jsonPayload = payload;
121+
requestConfig.jsonPayload = payload as SupersetPayload;
122122
}
123123

124124
let result: JsonValue | Response;

superset-frontend/packages/superset-ui-switchboard/src/switchboard.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,10 @@ export class Switchboard {
175175
/**
176176
* Defines a method that can be "called" from the other side by sending an event.
177177
*/
178-
defineMethod<A = any, R = any>(methodName: string, executor: Method<A, R>) {
178+
defineMethod<A extends {} = any, R = any>(
179+
methodName: string,
180+
executor: Method<A, R>,
181+
) {
179182
this.methods[methodName] = executor;
180183
}
181184

superset-frontend/plugins/plugin-chart-table/src/DataTable/hooks/useSticky.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ function useInstance<D extends object>(instance: TableInstance<D>) {
350350
);
351351

352352
const useStickyWrap = (renderer: TableRenderer) => {
353+
// @ts-ignore
353354
const { width, height } =
354355
useMountedMemo(getTableSize, [getTableSize]) || sticky;
355356
// only change of data should trigger re-render

superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ const config: ControlPanelConfig = {
189189
},
190190
],
191191
[
192-
hasGenericChartAxes && isAggMode
192+
hasGenericChartAxes
193193
? {
194194
name: 'time_grain_sqla',
195195
config: {
@@ -217,7 +217,7 @@ const config: ControlPanelConfig = {
217217
},
218218
}
219219
: null,
220-
hasGenericChartAxes && isAggMode ? 'temporal_columns_lookup' : null,
220+
hasGenericChartAxes ? 'temporal_columns_lookup' : null,
221221
],
222222
[
223223
{

superset-frontend/plugins/plugin-chart-table/src/utils/extent.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
* specific language governing permissions and limitations
1717
* under the License.
1818
*/
19+
20+
import { isNil } from 'lodash';
21+
1922
export default function extent<T = number | string | Date | undefined | null>(
2023
values: T[],
2124
) {
@@ -24,16 +27,16 @@ export default function extent<T = number | string | Date | undefined | null>(
2427
// eslint-disable-next-line no-restricted-syntax
2528
for (const value of values) {
2629
if (value !== null) {
27-
if (min === undefined) {
30+
if (isNil(min)) {
2831
if (value !== undefined) {
2932
min = value;
3033
max = value;
3134
}
32-
} else {
35+
} else if (value !== undefined) {
3336
if (min > value) {
3437
min = value;
3538
}
36-
if (max !== undefined) {
39+
if (!isNil(max)) {
3740
if (max < value) {
3841
max = value;
3942
}

superset-frontend/plugins/plugin-chart-word-cloud/src/chart/WordCloud.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ class WordCloud extends React.PureComponent<
158158
update() {
159159
const { data, encoding } = this.props;
160160

161+
// @ts-ignore
161162
const encoder = this.createEncoder(encoding);
162163
encoder.setDomainFromDataset(data);
163164

@@ -221,6 +222,7 @@ class WordCloud extends React.PureComponent<
221222
const { width, height, encoding, sliceId } = this.props;
222223
const { words } = this.state;
223224

225+
// @ts-ignore
224226
const encoder = this.createEncoder(encoding);
225227
encoder.channels.color.setDomainFromDataset(words);
226228

superset-frontend/src/components/Modal/Modal.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ const CustomModal = ({
261261
if (React.isValidElement(footer)) {
262262
// If a footer component is provided inject a closeModal function
263263
// so the footer can provide a "close" button if desired
264+
// @ts-ignore
264265
FooterComponent = React.cloneElement(footer, { closeModal: onHide });
265266
}
266267
const modalFooter = isNil(FooterComponent)

0 commit comments

Comments
 (0)