dprint-plugin-typescript
dprint-plugin-typescript copied to clipboard
Option for functional programming style type declarations
I'm aware this might be a niche style, so it's perfectly okay if this suggestion is declined. However, I'm interested in how I could implement type declarations in the style of Haskell or other functional programming languages with dprint. Here's what I had in mind:
NewLineAfterTypeInFunctionDeclaration
const add
: (a: number) => (b: number) => number = (a) => (b) => a + b
NewLineBeforeInitializerInVariableDeclaration
const add : (a: number) => (b: number) => number
= (a) => (b) => a + b
- Using both
const add
: (a: number) => (b: number) => number
= (a) => (b) => a + b
Any pointers on where to start or which parts of the codebase I should look into would be greatly appreciated. Thanks!
Have a look at https://github.com/dprint/dprint-plugin-typescript/pull/396