Take the following example:

```js
type A<Keys extends string, Prefix extends string> = 
  {[K in Keys]: `${Prefix}-${K}`}

function noGood<K extends string, Prefix extends string>(
  obj: A<K, Prefix>, prefix: Prefix
) {
// ...
}

const test: A<'one' | 'two', 'prefix'> = {"one": 'prefix-one', "two": 'prefix-two'}

noGood(test, 'desired to only be "prefix", but can be any string...')

```

You can see that the generic types of noGood are inferred from the first param (`obj`). Then, when you provide a string to the second param (`prefix`)

Obviously you could type out your call to `noGood` and it would disallow that random string for the second parameter, but ideally you wouldn't have to.

Edit:
The question was not clear.

To clarify, the problem is that when you infer the arguments to `noGood`, the `Prefix` inferrence does not work as desired (but not necessarily unexpected) since it would be ideal to have the `Prefix` constrained to the generic `Prefix` of `obj` (the first argument).

In this example, `Prefix` (generic) is literally `'prefix'` and it would be desired to only allow that for the `noGood` second argument that is inferred. However, when you call `noGood(obj, 'diff-prefix')` the `Prefix` generic becomes `'prefix' | 'diff-prefix'` and ideally it would be constrained to the inferred type from `obj` rather than the inferred type from the union of the first and the second argument.

Hope that clears things up. Can definitely see how it was unclear.