diff --git a/libs/movex-core-util/src/lib/EventEmitter/EventEmitter.ts b/libs/movex-core-util/src/lib/EventEmitter/EventEmitter.ts index a0769c81..26e64a48 100644 --- a/libs/movex-core-util/src/lib/EventEmitter/EventEmitter.ts +++ b/libs/movex-core-util/src/lib/EventEmitter/EventEmitter.ts @@ -1,7 +1,7 @@ import type { EventMap } from 'typed-emitter'; import type { EmptyFn } from '../core-types'; -export const emptyFn: EmptyFn = () => {}; +// export const emptyFn: EmptyFn = () => {}; export interface EventEmitter { on( diff --git a/libs/movex-core-util/src/lib/core-types.ts b/libs/movex-core-util/src/lib/core-types.ts index 7a243671..98f045e9 100644 --- a/libs/movex-core-util/src/lib/core-types.ts +++ b/libs/movex-core-util/src/lib/core-types.ts @@ -238,8 +238,7 @@ export type MovexClient = { }; export type SanitizedMovexClient = - Pick, 'id' | 'info'> & { - }; + Pick, 'id' | 'info'> & object; export type ResourceIdentifierObj = { resourceType: TResourceType; diff --git a/libs/movex-core-util/src/lib/md5.ts b/libs/movex-core-util/src/lib/md5.ts index 3bf64c85..62aa8282 100644 --- a/libs/movex-core-util/src/lib/md5.ts +++ b/libs/movex-core-util/src/lib/md5.ts @@ -1,6 +1,6 @@ -var k: any = [], - i = 0; +const k: any = []; +let i = 0; for (; i < 64; ) { k[i] = 0 | (Math.sin(++i % Math.PI) * 4294967296); @@ -8,13 +8,13 @@ for (; i < 64; ) { } export function md5(s: any) { - var b, + let b, c, d, - h = [(b = 0x67452301), (c = 0xefcdab89), ~b, ~c], - words: number[] = [], j: any = unescape(encodeURI(s)) + '\x80', a = j.length; + const words: number[] = []; + const h = [(b = 0x67452301), (c = 0xefcdab89), ~b, ~c]; s = (--a / 4 + 2) | 15; diff --git a/libs/movex-core-util/src/lib/misc.ts b/libs/movex-core-util/src/lib/misc.ts index 406b3980..e314bdfb 100644 --- a/libs/movex-core-util/src/lib/misc.ts +++ b/libs/movex-core-util/src/lib/misc.ts @@ -22,7 +22,7 @@ export const isObject = (o: unknown): o is object => { export const isFunction = (x: unknown): x is (...args: any) => any => typeof x === 'function'; -export const objectOmit = ( +export const objectOmit = ( o: O, toOmit: ToOmit ) => @@ -37,7 +37,7 @@ export const objectOmit = ( }; }, {} as DistributiveOmit>); -export const objectPick = ( +export const objectPick = ( o: O, toPick: ToPick ) => diff --git a/libs/movex-react-local-master/src/lib/MovexLocalMasterProvider.tsx b/libs/movex-react-local-master/src/lib/MovexLocalMasterProvider.tsx index 9aea5404..f478ba5d 100644 --- a/libs/movex-react-local-master/src/lib/MovexLocalMasterProvider.tsx +++ b/libs/movex-react-local-master/src/lib/MovexLocalMasterProvider.tsx @@ -3,7 +3,6 @@ import { invoke, globalLogsy, noop, - emptyFn, type StringKeys, type GetReducerState, type BaseMovexDefinitionResourcesMap, @@ -84,7 +83,7 @@ export const MovexLocalMasterProvider: React.FC< }; } - return emptyFn; + return () => {}; }, []); useEffect(() => {