chore: remove stale unsafe assertion suppressions · openclaw/openclaw@63a9593
steipete
·
2026-05-31
·
via Recent Commits to openclaw:main
File tree
extensions/mattermost/src/mattermost
| Original file line number | Diff line number | Diff line change |
|---|
@@ -158,7 +158,6 @@ export function createMattermostClient(params: {
|
158 | 158 | if (contentType.includes("application/json")) { |
159 | 159 | return (await res.json()) as T; |
160 | 160 | } |
161 | | - |
162 | 161 | return (await res.text()) as T; |
163 | 162 | }; |
164 | 163 | |
@@ -593,7 +592,6 @@ export async function uploadMattermostFile(
|
593 | 592 | const detail = await readMattermostError(res); |
594 | 593 | throw new Error(`Mattermost API ${res.status} ${res.statusText}: ${detail || "unknown error"}`); |
595 | 594 | } |
596 | | - |
597 | 595 | const data = (await res.json()) as { file_infos?: MattermostFileInfo[] }; |
598 | 596 | const info = data.file_infos?.[0]; |
599 | 597 | if (!info?.id) { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -61,6 +61,11 @@ const pluginModuleLoaderStats = {
|
61 | 61 | sourceTransformTargets: new Map<string, number>(), |
62 | 62 | }; |
63 | 63 | |
| 64 | +function isJitiLoaderModule(value: unknown): value is { createJiti: PluginModuleLoaderFactory } { |
| 65 | +const canHaveProperties = (value && typeof value === "object") || typeof value === "function"; |
| 66 | +return canHaveProperties && "createJiti" in value && typeof value.createJiti === "function"; |
| 67 | +} |
| 68 | + |
64 | 69 | function recordSourceTransformTarget(target: string): void { |
65 | 70 | const current = pluginModuleLoaderStats.sourceTransformTargets.get(target) ?? 0; |
66 | 71 | pluginModuleLoaderStats.sourceTransformTargets.set(target, current + 1); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。