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;