mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-18 14:25:51 +00:00
feat: 完成一大波类型修复, 虽然 any 很多
This commit is contained in:
@@ -106,7 +106,7 @@ export async function hasImageInClipboard(): Promise<boolean> {
|
||||
// as an unhandled rejection in useClipboardImageHint's setTimeout.
|
||||
try {
|
||||
const { getNativeModule } = await import('image-processor-napi')
|
||||
const hasImage = getNativeModule()?.hasClipboardImage
|
||||
const hasImage = getNativeModule()!?.hasClipboardImage
|
||||
if (hasImage) {
|
||||
return hasImage()
|
||||
}
|
||||
@@ -135,7 +135,7 @@ export async function getImageFromClipboard(): Promise<ImageWithDimensions | nul
|
||||
) {
|
||||
try {
|
||||
const { getNativeModule } = await import('image-processor-napi')
|
||||
const readClipboard = getNativeModule()?.readClipboardImage
|
||||
const readClipboard = getNativeModule()!?.readClipboardImage
|
||||
if (!readClipboard) {
|
||||
throw new Error('native clipboard reader unavailable')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user