Skip to content

Commit

Permalink
chore(deps): bump typescript to 4.8.4 (apache#24272)
Browse files Browse the repository at this point in the history
Co-authored-by: Ville Brofeldt <[email protected]>
  • Loading branch information
jansule and villebro committed Jan 29, 2024
1 parent f73760a commit 29582e8
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 20 deletions.
14 changes: 7 additions & 7 deletions superset-frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion superset-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ const config: ControlPanelConfig = {
},
],
[
hasGenericChartAxes && isAggMode
hasGenericChartAxes
? {
name: 'time_grain_sqla',
config: {
Expand Down Expand Up @@ -217,7 +217,7 @@ const config: ControlPanelConfig = {
},
}
: null,
hasGenericChartAxes && isAggMode ? 'temporal_columns_lookup' : null,
hasGenericChartAxes ? 'temporal_columns_lookup' : null,
],
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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[],
) {
Expand All @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);

Expand Down
1 change: 1 addition & 0 deletions superset-frontend/src/components/Modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 29582e8

Please sign in to comment.