When attempting to utilize ramda for extracting data[].data.tags, I encountered a type error in TypeScript
R.pipe(
R.map(R.prop('data')),
R.map(R.prop('tags')) // typescript error
)([{data: {tags: ['t1', 't2'], title: ''}, meta: null}])
I believe I need to specify types in R.pipe
The dependencies I am using are:
"@types/ramda": "^0.27.60",
"typescript": "4.5.4",
"ramda": "^0.27.1",
Here is my tsconfig.js configuration:
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}
Any suggestions or advice would be greatly appreciated