How to remove unnecessary casting with Ramda and Typescript
问题 Consider const darkPalette = [ '#255dbd', '#2c6bd7', '#5386e2', '#7ea5e9', '#49bbdb', '#56d6f9', '#89e2fa', '#aaeafc', '#00a690', '#10bda4', '#6ad8c8', '#9de4da', '#9dc53b', '#bae050', '#dcf0a3', '#eaf6c8', ] const transposePalette = compose(flatten, transpose, splitEvery(4)) const transposedDarkPalette = transposePalette(darkPalette) When i receive the result of transposedDarkPalette the compiler complains: Types of property 'color' are incompatible. Type '{}[]' is not assignable to type