typescript fixes, replayer close error, show page toggle fix.
This commit is contained in:
1 parent
10dced1049
commit
f3ce0e64ca
15 files changed
+67
-28
No files matched your search
+1
-1
@@ -5,7 +5,7 @@ export const KAFKA = 'kafka';
|
||||
export const KAFKA_PRODUCER = 'kafka-producer';
|
||||
|
||||
// Fixes issue with converting bigint values
|
||||
BigInt.prototype.toJSON = function () {
|
||||
(BigInt.prototype as unknown as { toJSON(): number }).toJSON = function () {
|
||||
return Number(this);
|
||||
};
|
||||
|
||||
|
||||
+5
-1
@@ -4,6 +4,10 @@ import type { Filter, Operator, PropertyFilter, QueryFilters, QueryOptions } fro
|
||||
const VALID_OPERATORS: Operator[] = Object.values(OPERATORS);
|
||||
const VALID_EVENT_DATA_TYPES = Object.values(DATA_TYPE);
|
||||
|
||||
function isValidEventDataType(value: number): value is (typeof VALID_EVENT_DATA_TYPES)[number] {
|
||||
return VALID_EVENT_DATA_TYPES.includes(value as (typeof VALID_EVENT_DATA_TYPES)[number]);
|
||||
}
|
||||
|
||||
function resolveOperator(value?: string): Operator | undefined {
|
||||
if (!value) {
|
||||
return undefined;
|
||||
@@ -126,7 +130,7 @@ export function parsePropertyFilters(
|
||||
|
||||
if (
|
||||
!operator ||
|
||||
(explicitDataType !== undefined && !VALID_EVENT_DATA_TYPES.includes(explicitDataType))
|
||||
(explicitDataType !== undefined && !isValidEventDataType(explicitDataType))
|
||||
) {
|
||||
return [];
|
||||
}
|
||||
|
||||
+4
-2
@@ -8,9 +8,11 @@ import {
|
||||
type ReactNode,
|
||||
} from 'react';
|
||||
|
||||
type ReactElementWithChildren = ReactElement<{ children?: ReactNode }>;
|
||||
|
||||
export function getFragmentChildren(children: ReactNode) {
|
||||
return (children as ReactElement)?.type === Fragment
|
||||
? (children as ReactElement).props.children
|
||||
return (children as ReactElementWithChildren)?.type === Fragment
|
||||
? (children as ReactElementWithChildren).props.children
|
||||
: children;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user