Closed jnoordsij closed 3 months ago
@jnoordsij, This is probably not the correct fix. This project can and is used by some people with plain JS. We should not add typescript as a peerDependency
Hey there, thanks for checking this! I do think this is the correct fix for this case, given
ts-essentials
is listed as a (hard) dependency, although this is also only required for those using TypeScriptts-essentials
requires a (very broad but technically speaking still a) specific range of TypeScript versions and lists this as peerDependency
, it is up to this package to fulfill that in some waypeerDependency
, it is up to the end-user to decide on wether or not to use TypeScript, therefore not adding an additional package (even though ts-essentials
still is added)The only alternative I see is moving ts-essentials
to be an optional peerDependency
, but I think that is more breaking and invasive to end-users, given that it is harder to realise that they should be providing that in case they are using TypeScript, compared to them installing typescript
when they want to use TypeScript.
@jnoordsij, oh, didn't realise that ts-essentials
is a dependency O_O.
@Akryum wdyt on this?
As ts-essentials
now has its typescript
dependency marked as optional (see https://github.com/ts-essentials/ts-essentials/pull/371), this is no longer required to fix the issue. One may opt to still add this as some possibly useful metadata, although maybe having it at ts-essentials
and leaving it there suffices. So feel free to close this if there's no time or reason to review/merge this further.
Fixes #1499