From c60a607613865c15aae686ba181a9fe1a8055fbc Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 21 Aug 2026 23:09:18 -0700 Subject: [PATCH] test: lock NullishDeep for interface-shaped values Regression for partial nested null updates on interface types so Record-constraint regressions fail typecheck. --- tests/types/nullishDeep.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tests/types/nullishDeep.ts diff --git a/tests/types/nullishDeep.ts b/tests/types/nullishDeep.ts new file mode 100644 index 000000000..4c0972457 --- /dev/null +++ b/tests/types/nullishDeep.ts @@ -0,0 +1,19 @@ +import type {NullishDeep} from '../../dist/types'; + +interface TextEditor { + fontSize: number; + fontColor: string; + fontWeight: number; +} + +interface Settings { + textEditor: TextEditor; + autosave: boolean; +} + +// Interface-based Onyx value types must support partial nested null updates via NullishDeep +const partialSettingsUpdate: NullishDeep = { + textEditor: {fontWeight: 500, fontColor: null}, +}; + +export default partialSettingsUpdate;