mirror of
https://github.com/stablyai/orca.git
synced 2026-10-19 00:03:20 +00:00
fix(types): exclude absent stat overloads
This commit is contained in:
@@ -7,7 +7,7 @@ import {
|
||||
} from '../../shared/cross-platform-path'
|
||||
import type { FileStat } from '../providers/types'
|
||||
|
||||
type GitDirectoryStat = Awaited<ReturnType<typeof stat>> | FileStat
|
||||
type GitDirectoryStat = NonNullable<Awaited<ReturnType<typeof stat>>> | FileStat
|
||||
|
||||
type GitDirectoryAccess = {
|
||||
stat?: (path: string) => Promise<GitDirectoryStat>
|
||||
|
||||
@@ -28,7 +28,7 @@ export function normalizedSkillIdentityPath(value: string): string {
|
||||
|
||||
export function skillPhysicalIdentity(
|
||||
resolvedPath: string,
|
||||
fileStat: Awaited<ReturnType<typeof stat>>
|
||||
fileStat: NonNullable<Awaited<ReturnType<typeof stat>>>
|
||||
): string {
|
||||
const inodeIdentity = fileStat.dev || fileStat.ino ? `${fileStat.dev}:${fileStat.ino}` : null
|
||||
return inodeIdentity ?? normalizedSkillIdentityPath(resolvedPath)
|
||||
|
||||
Reference in New Issue
Block a user