Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Smalley <[email protected]>
  • Loading branch information
Tyler Smalley committed Sep 15, 2021
1 parent aa2ef4a commit bd02f80
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ function isRangeControl(control: RangeControl | ListControl): control is RangeCo
return control.type === CONTROL_TYPES.RANGE;
}

interface UnknownControl {
type: string;
}

interface InputControlVisProps {
stageFilter: (controlIndex: number, newValue: any) => void;
submitFilters: () => void;
Expand Down Expand Up @@ -90,7 +94,7 @@ export class InputControlVis extends Component<InputControlVisProps> {
/>
);
} else {
throw new Error(`Unhandled control type ${control!.type}`);
throw new Error(`Unhandled control type ${(control as UnknownControl)!.type}`);
}

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ export class FeatureGeometryFilterForm extends Component<Props, State> {
// Ensure filter will not overflow URL. Filters that contain geometry can be extremely large.
// No elasticsearch support for pre-indexed shapes and geo_point spatial queries.
if (
window.location.href.length + rison.encode(filter as RisonObject).length + META_OVERHEAD >
window.location.href.length +
rison.encode((filter as unknown) as RisonObject).length +
META_OVERHEAD >
URL_MAX_LENGTH
) {
this.setState({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('ML - data recognizer', () => {
bulkCreate: jest.fn(),
} as unknown) as SavedObjectsClientContract,
{} as JobSavedObjectService,
{ headers: { authorization: '' } } as KibanaRequest
({ headers: { authorization: '' } } as unknown) as KibanaRequest
);

describe('jobOverrides', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@ export const SUB_PLUGINS_REDUCER: SubPluginsInitReducer = {
* These state's are wrapped in `Immutable`, but for compatibility with the overall app architecture,
* they are cast to mutable versions here.
*/
management: managementReducer as ManagementPluginReducer['management'],
management: (managementReducer as unknown) as ManagementPluginReducer['management'],
};
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class Management {
* Cast the ImmutableReducer to a regular reducer for compatibility with
* the subplugin architecture (which expects plain redux reducers.)
*/
reducer: { management: managementReducer } as ManagementPluginReducer,
reducer: ({ management: managementReducer } as unknown) as ManagementPluginReducer,
middleware: managementMiddlewareFactory(core, plugins),
},
};
Expand Down
6 changes: 4 additions & 2 deletions x-pack/test/apm_api_integration/tests/traces/trace_by_id.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ export default function ApiTest({ getService }: FtrProviderContext) {
expectSnapshot(
response.body.traceDocs.map((doc) =>
doc.processor.event === 'transaction'
? `${doc.transaction.name} (transaction)`
: `${doc.span.name} (span)`
? // @ts-expect-error
`${doc.transaction.name} (transaction)`
: // @ts-expect-error
`${doc.span.name} (span)`
)
).toMatchInline(`
Array [
Expand Down

0 comments on commit bd02f80

Please sign in to comment.