Currently, OID is represented as a string. To improve type safety and prevent errors, we should introduce a branded type for OID (e.g. type OID = string & { __brand: "OID" }) to ensure that only validated 40-character hex strings are passed to core functions.
Similarly, the FileMode should be enforced strictly across all internal APIs to prevent invalid mode assignments.
Currently, OID is represented as a string. To improve type safety and prevent errors, we should introduce a branded type for OID (e.g. type OID = string & { __brand: "OID" }) to ensure that only validated 40-character hex strings are passed to core functions.
Similarly, the FileMode should be enforced strictly across all internal APIs to prevent invalid mode assignments.