Skip to content

Commit

Permalink
Use mode instead of enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
jerelmiller committed Jan 8, 2025
1 parent b92373b commit adadab1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/masking/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ export type MaybeMasked<TData> =
// prevent "Type instantiation is excessively deep and possibly infinite."
true extends IsAny<TData> ? TData
: TData extends { __masked?: true } ? Prettify<RemoveMaskedMarker<TData>>
: DataMasking extends { enabled: false } ?
: DataMasking extends { mode: "preserveTypes" } ? TData
: DataMasking extends { mode: "unmask" } ?
true extends ContainsFragmentsRefs<TData> ?
Unmasked<TData>
: TData
Expand Down

0 comments on commit adadab1

Please sign in to comment.