mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-16 03:40:43 +00:00
chore(lint): enable unnecessary type parameter rule
This commit is contained in:
@@ -1,8 +1,4 @@
|
||||
export function defineCachedValue<T extends object, K extends PropertyKey>(
|
||||
target: T,
|
||||
key: K,
|
||||
create: () => unknown,
|
||||
): void {
|
||||
export function defineCachedValue(target: object, key: PropertyKey, create: () => unknown): void {
|
||||
let cached: unknown;
|
||||
let ready = false;
|
||||
Object.defineProperty(target, key, {
|
||||
|
||||
@@ -314,6 +314,7 @@ export function createRuntimeChannel(): PluginRuntime["channel"] {
|
||||
});
|
||||
return { dispose };
|
||||
},
|
||||
// oxlint-disable-next-line typescript/no-unnecessary-type-parameters -- Runtime context values are caller-typed by key.
|
||||
get: <T = unknown>(params: PluginRuntimeChannelContextKey) => {
|
||||
const normalized = normalizeRuntimeContextKey(params);
|
||||
if (!normalized) {
|
||||
|
||||
@@ -127,6 +127,7 @@ export function getPluginBoundaryJiti(modulePath: string, loaders: PluginJitiLoa
|
||||
});
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line typescript/no-unnecessary-type-parameters -- Dynamic plugin boundary loaders use caller-supplied module types.
|
||||
export function loadPluginBoundaryModuleWithJiti<TModule>(
|
||||
modulePath: string,
|
||||
loaders: PluginJitiLoaderCache,
|
||||
@@ -134,6 +135,7 @@ export function loadPluginBoundaryModuleWithJiti<TModule>(
|
||||
return getPluginBoundaryJiti(modulePath, loaders)(modulePath) as TModule;
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line typescript/no-unnecessary-type-parameters -- Dynamic plugin boundary loaders use caller-supplied module types.
|
||||
export function createCachedPluginBoundaryModuleLoader<TModule>(
|
||||
params: CachedPluginBoundaryLoaderParams,
|
||||
): () => TModule | null {
|
||||
|
||||
@@ -60,6 +60,7 @@ export type PluginRuntimeChannelContextRegistry = {
|
||||
abortSignal?: AbortSignal;
|
||||
},
|
||||
) => { dispose: () => void };
|
||||
// oxlint-disable-next-line typescript/no-unnecessary-type-parameters -- Runtime context values are caller-typed by key.
|
||||
get: <T = unknown>(params: PluginRuntimeChannelContextKey) => T | undefined;
|
||||
watch: (params: {
|
||||
channelId?: string;
|
||||
|
||||
Reference in New Issue
Block a user