The problem is TypeScript thinks the value I provide for the `UiConfigContext.Provider` may be undefined. Probably because of the `?` config optional param however, I do provide the default `{ [Permission.Read]: true}`. I don't understand why it still thinks it could ever be undefined. I want this function's parameter to be optional so anything like that would work:

```
renderTestComponent();
renderTestComponent({ config: { [Permission.Read]: true });
renderTestComponent({ enterDetails: true });
renderTestComponent({ config: { [Permission.Read]: true }, enterDetails: true );

```

Here's my code ([replicated error in TypeScript playground](https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAJQKYEMDGMA0cDec1SoxIDCEAdsQB7wC%20cAZlBCHAOSHoxsDcAUHyTkArqwAKSKCGABnGcAq4%20cFYlQATOAF52yFOraZlqgOpRgxbezMWkhvrQEwAnmCRwy5BsADmwqCgwCuRWYiiwwCgANgA8yGjQ6jESUrLyFNgARhAQUajkAHwF-IJUkLD4FDLwAKrAnt4%20ntTwOgREpBQtMQ2%20-oHBcAA%20cCJRUQUAFGNRAJQlDMLkGIOE5OqSACpI1WTgFEIwk%20E%20MgBcSqqVXr4A-Be9fgFBFPxXh5IAIkgwKMBRMnucGyuXy-HoOhwxhUCRuPgueAA2ilpHJggA6PTqAC6FxgUGESFoRnelC%20Pz%20AIuDGiMiQDlml1UMTqj2aSBo6LEzAAbsANlA4DzooStDgTjJ0bDGrQCtCrnBttV5TEAPSsiiNdmc7kQPkCuX0PhAA))

```
import React, { createContext } from 'react';

enum Permission {
    Read = 'Read',
    Write = 'Write',
}

type Configuration = Partial<Record<Permission, boolean>>;

export const UiConfigContext = createContext<Configuration | null>(null);

function renderTestComponent(args: {
    config?: Configuration;
    enterDetails?: boolean;
} = {
    config: { [Permission.Read]: true},
    enterDetails: false
}) {
    <UiConfigContext.Provider value={args.config}>
        Test
    </UiConfigContext.Provider>
}

```