name: (name : string)=>string; } type Foo = ()=>{}; ``` ### overrides - arrow ```json { "before": false, "after": false, "overrides": { "arrow": { "before": true, "after": true } } } ``` #### ❌ Incorrect ```ts option='{"before":false,"after":false,"overrides":{"arrow":{"before":true,"after":true}}}' let foo: string = "bar"; let foo : string = "bar"; let foo :string = "bar"; function foo(): string {} function foo():string {} function foo() :string {} class Foo { name: string; } class Foo { name : string; } class Foo { name :string; } type Foo = ()=>{}; type Foo = () =>{}; type Foo = ()=> {}; ``` #### ✅ Correct ```ts option='{"before":false,"after":false,"overrides":{"arrow":{"before":true,"after":true}}}' let foo:string = "bar"; function foo():string {} class Foo { name:string; } type Foo = () => {}; ``` ## When Not To Use It If you don't want to enforce spacing for your type annotations, you can safely turn this rule off. ## Further Reading - [TypeScript Type System](https://basarat.gitbooks.io/typescript/docs/types/type-system.html) - [Type Inference](https://www.typescriptlang.org/docs/handbook/type-inference.html)