effect icon indicating copy to clipboard operation
effect copied to clipboard

Type signature for GenericTag's key parameter is incorrect

Open nounder opened this issue 9 months ago • 1 comments

What version of Effect is running?

3.13.10

What steps can reproduce the bug?

Documentation for GenericTag says key parameter is optional but signature doesn't allow it:

/**
 * Creates a new `Tag` instance with an optional key parameter.
 */
export const GenericTag: <Identifier, Service = Identifier>(key: string) => Tag<Identifier, Service> =
  internal.makeGenericTag

As far as I understand, the key is optional and only used to make sure that Effect is able to reference to the same Tag when reference changes, like it is the case in hot reloading.

What is the expected behavior?

Key parameter is optional

nounder avatar Mar 26 '25 15:03 nounder

The jsdocs need updating, as the key is not optional.

tim-smart avatar Mar 31 '25 03:03 tim-smart