dprint-plugin-typescript
dprint-plugin-typescript copied to clipboard
Formatting Assigned Large Generic Types on New Line
I have a max width of 100
and wrote the following:
export type EnsureKnownLookup<T, L extends { [N in NetworkName]: T }> =
EnsureLookup<NetworkName, T, L>;
Upon applying dprint, the line above becomes the following:
export type EnsureKnownLookup<T, L extends { [N in NetworkName]: T }> = EnsureLookup<
NetworkName,
T,
L
>;
I can also format it like so:
export type EnsureKnownLookup<
T,
L extends { [N in NetworkName]: T },
> = EnsureLookup<NetworkName, T, L>;
However, neither are (imo) as clean nor legible as the initial. Is there a correct way to get dprint to respect the initial format (ideally without ignoring the line, changing the max width, etc.)?