address typescript errors
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
'@backstage/config-loader': patch
|
||||
'@backstage/core-api': patch
|
||||
'@backstage/plugin-catalog-backend': patch
|
||||
'@backstage/plugin-cost-insights': patch
|
||||
---
|
||||
|
||||
Added a type alias for PositionError = GeolocationPositionError
|
||||
+12
@@ -97,3 +97,15 @@ declare module '*.module.sass' {
|
||||
const classes: { readonly [key: string]: string };
|
||||
export default classes;
|
||||
}
|
||||
|
||||
// NOTE(freben): Both the fix, and the placement of the fix, are not great.
|
||||
//
|
||||
// The fix is because the PositionError was renamed to
|
||||
// GeolocationPositionError outside of our control, and react-use is dependent
|
||||
// on the old name.
|
||||
//
|
||||
// The placement is because it's the one location we have at the moment, where
|
||||
// a central .d.ts file is imported by the frontend and can be amended.
|
||||
//
|
||||
// After both TS and react-use are bumped high enough, this should be removed.
|
||||
type PositionError = GeolocationPositionError;
|
||||
|
||||
@@ -19,7 +19,7 @@ import { Observable } from '../../../types';
|
||||
|
||||
type RequestQueueEntry<ResultType> = {
|
||||
scopes: Set<string>;
|
||||
resolve: (value?: ResultType | PromiseLike<ResultType> | undefined) => void;
|
||||
resolve: (value: ResultType | PromiseLike<ResultType>) => void;
|
||||
reject: (reason: Error) => void;
|
||||
};
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ describe('buildMemberOf', () => {
|
||||
const u: UserEntity = {
|
||||
apiVersion: 'backstage.io/v1alpha1',
|
||||
kind: 'User',
|
||||
metadata: { name },
|
||||
metadata: { name: 'n' },
|
||||
spec: { profile: {}, memberOf: ['c'] },
|
||||
};
|
||||
|
||||
|
||||
@@ -222,16 +222,13 @@ export const useBarChartLabelStyles = makeStyles<BackstageTheme>(theme =>
|
||||
}),
|
||||
);
|
||||
|
||||
export const useCostInsightsStyles = makeStyles<BackstageTheme>(
|
||||
(theme: BackstageTheme) =>
|
||||
createStyles({
|
||||
h6Subtle: {
|
||||
...theme.typography.h6,
|
||||
fontWeight: 'normal',
|
||||
color: theme.palette.textSubtle,
|
||||
},
|
||||
}),
|
||||
);
|
||||
export const useCostInsightsStyles = makeStyles<BackstageTheme>(theme => ({
|
||||
h6Subtle: {
|
||||
...theme.typography.h6,
|
||||
fontWeight: 'normal',
|
||||
color: theme.palette.textSubtle,
|
||||
},
|
||||
}));
|
||||
|
||||
export const useCostInsightsTabsStyles = makeStyles<BackstageTheme>(
|
||||
(theme: BackstageTheme) => ({
|
||||
@@ -310,40 +307,37 @@ export const useCostGrowthStyles = makeStyles<BackstageTheme>(
|
||||
}),
|
||||
);
|
||||
|
||||
export const useCostGrowthLegendStyles = makeStyles<BackstageTheme>(
|
||||
(theme: BackstageTheme) =>
|
||||
createStyles({
|
||||
h5: {
|
||||
...theme.typography.h5,
|
||||
fontWeight: 500,
|
||||
padding: 0,
|
||||
},
|
||||
marker: {
|
||||
display: 'inherit',
|
||||
marginRight: theme.spacing(1),
|
||||
},
|
||||
helpIcon: {
|
||||
display: 'inherit',
|
||||
},
|
||||
title: {
|
||||
...theme.typography.overline,
|
||||
fontWeight: 500,
|
||||
lineHeight: 0,
|
||||
marginRight: theme.spacing(1),
|
||||
color: theme.palette.textSubtle,
|
||||
},
|
||||
tooltip: {
|
||||
display: 'block',
|
||||
padding: theme.spacing(1),
|
||||
backgroundColor: theme.palette.navigation.background,
|
||||
},
|
||||
tooltipText: {
|
||||
color: theme.palette.background.default,
|
||||
fontSize: theme.typography.fontSize,
|
||||
lineHeight: 1.5,
|
||||
},
|
||||
}),
|
||||
);
|
||||
export const useCostGrowthLegendStyles = makeStyles<BackstageTheme>(theme => ({
|
||||
h5: {
|
||||
...theme.typography.h5,
|
||||
fontWeight: 500,
|
||||
padding: 0,
|
||||
},
|
||||
marker: {
|
||||
display: 'inherit',
|
||||
marginRight: theme.spacing(1),
|
||||
},
|
||||
helpIcon: {
|
||||
display: 'inherit',
|
||||
},
|
||||
title: {
|
||||
...theme.typography.overline,
|
||||
fontWeight: 500,
|
||||
lineHeight: 0,
|
||||
marginRight: theme.spacing(1),
|
||||
color: theme.palette.textSubtle,
|
||||
},
|
||||
tooltip: {
|
||||
display: 'block',
|
||||
padding: theme.spacing(1),
|
||||
backgroundColor: theme.palette.navigation.background,
|
||||
},
|
||||
tooltipText: {
|
||||
color: theme.palette.background.default,
|
||||
fontSize: theme.typography.fontSize,
|
||||
lineHeight: 1.5,
|
||||
},
|
||||
}));
|
||||
|
||||
export const useBarChartStepperStyles = makeStyles<BackstageTheme>(
|
||||
(theme: BackstageTheme) =>
|
||||
|
||||
Reference in New Issue
Block a user