Imagine this config object:

```js
interface NodeConfig {
  type: 'circle' | 'square'; // must always be specified, no default value
  color?: 'red' | 'blue'; // has a default value therefore is optional on input
  effect?: 'spinning' | 'bouncing'; // is completely optional, not present = no effect
}

const defaultNodeConfig: Partial<NodeConfig> = {
  color: 'blue',
} as const;

function drawNode(config: NodeConfig) {
  const actualConfig = {...defaultNodeConfig, ...config};
  // type of actualConfig.color should be non-nullable now
  // since it was provided by defaultNodeConfig
}

```

I want to:

1. guard that `defaultNodeConfig` conforms to `NodeConfig` interface, so I don't provide invalid values here (e.g. `color: 'black'`),
2. properly infer type of `{...defaultNodeConfig, ...config}` so that properties provided by default config are no more optional and I don't have to unwrap them with `!`

The problem is:

* When I have specified `defaultNodeConfig: Partial<NodeConfig>`, it breaks the second requirement - the type is `NodeConfig & Partial<NodeConfig>` therefore `NodeConfig`, no clue about `color` being always present
* When I remove the type declaration `: Partial<NodeConfig>`, second requirement is met as expected, but type of `defaultNodeConfig` is not constrained anymore so I can put `{color: 'black'}` to it.

Is there a way to meet both requirements, without needing to explicitly specify all the types and what should be optional at which moment? Something like `const defaultNodeConfig: Partial<NodeConfig> & typeof itself` (no, that syntax doesn't work) that says "Constrain the constant to meet the type, but use its inferred type when the constant is used"?