@xylabs/object
Advanced tools
Comparing version 4.4.15 to 4.4.16
export type OmitStartsWith<T, Prefix extends string> = { | ||
[K in keyof T as K extends `${Prefix}${string}` ? never : K]: T[K]; | ||
}; | ||
export type DeepOmitStartsWith<T, Prefix extends string> = T extends (infer U)[] ? DeepOmitStartsWith<U, Prefix>[] : T extends object ? { | ||
[K in keyof T as K extends string ? K extends `${Prefix}${string}` ? never : K : K]: DeepOmitStartsWith<T[K], Prefix>; | ||
} : T; | ||
export type DeepRestrictToStringKeys<T> = { | ||
[K in keyof T as K extends string ? K : never]: T[K] extends (infer U)[] ? DeepRestrictToStringKeys<U>[] : T[K] extends object ? DeepRestrictToStringKeys<T[K]> : T[K]; | ||
}; | ||
//# sourceMappingURL=OmitStartsWith.d.ts.map |
{ | ||
"name": "@xylabs/object", | ||
"version": "4.4.15", | ||
"version": "4.4.16", | ||
"description": "Primary SDK for using XYO Protocol 2.0", | ||
@@ -32,6 +32,6 @@ "homepage": "https://xyo.network", | ||
"dependencies": { | ||
"@xylabs/assert": "^4.4.15", | ||
"@xylabs/logger": "^4.4.15", | ||
"@xylabs/promise": "^4.4.15", | ||
"@xylabs/typeof": "^4.4.15" | ||
"@xylabs/assert": "^4.4.16", | ||
"@xylabs/logger": "^4.4.16", | ||
"@xylabs/promise": "^4.4.16", | ||
"@xylabs/typeof": "^4.4.16" | ||
}, | ||
@@ -38,0 +38,0 @@ "devDependencies": { |
export type OmitStartsWith<T, Prefix extends string> = { | ||
[K in keyof T as K extends `${Prefix}${string}` ? never : K]: T[K]; | ||
} | ||
export type DeepOmitStartsWith<T, Prefix extends string> = T extends (infer U)[] | ||
? DeepOmitStartsWith<U, Prefix>[] // Special handling for arrays | ||
: T extends object | ||
? { | ||
[K in keyof T as K extends string | ||
? K extends `${Prefix}${string}` | ||
? never | ||
: K | ||
: K]: DeepOmitStartsWith<T[K], Prefix>; | ||
} | ||
: T | ||
export type DeepRestrictToStringKeys<T> = { | ||
[K in keyof T as K extends string ? K : never]: T[K] extends (infer U)[] | ||
? DeepRestrictToStringKeys<U>[] // Handle arrays recursively | ||
: T[K] extends object | ||
? DeepRestrictToStringKeys<T[K]> // Handle objects recursively | ||
: T[K]; // Leave other types untouched | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
120030
1047
Updated@xylabs/assert@^4.4.16
Updated@xylabs/logger@^4.4.16
Updated@xylabs/promise@^4.4.16
Updated@xylabs/typeof@^4.4.16