This repository was archived by the owner on Jan 19, 2019. It is now read-only.
This repository was archived by the owner on Jan 19, 2019. It is now read-only.
[type-annotation-spacing] fails in object types under different conditions #152
Closed
Description
rule config:
"typescript/type-annotation-spacing": ["error", {"before": true, "after": true}]
code:
class Some {
// fails on every `:` inside object typing (expected)
a : {some: string, other: {more: number}};
// doesn't fail (not expected)
someMethod : (args : {some: string, other: {more: number}}) => void;
// doesn't fail (not expected)
doSomething(args : {some: string, other: {more: number}}) : void {}
}
// doesn't fail (not expected)
function some(args : {some: string, other: {more: number}}) : void {}
// doesn't fail (not expected)
const a : {some: string, other: {more: number}} = {some: '1', other: {more: 2}};