2

i added

"lib": [
      "ES2020.Promise",
    ],

to my ts config because i needed to use promise.allSettled(), however, this caused a regression to my compile time checks as it's now failing on built in javascript functions like

Property 'flat' does not exist on type 'ConditionalAttributeEntity[][]'
const conditionalAttributes = conditionalAttributesUnprocessed.flat();

Parameter 'component' implicitly has an 'any' type.
.filter(component => _.has(component, 'componentList'))

before these worked fine

my config looks like this

   "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "forceConsistentCasingInFileNames": true,
    "incremental": true,
    "module": "commonjs",
    "noErrorTruncation": true,
    "noFallthroughCasesInSwitch": true,
    "noImplicitReturns": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "pretty": true,
    "resolveJsonModule": true,
    "skipLibCheck": true,
    "sourceMap": true,
    "strict": true,
    "target": "ES2019",
    "lib": [
      "ES2020.Promise",
    ],

Is there anything i can do to more modularly use promise.allSettled() while keeping compile time checks the same?

sf8193
  • 575
  • 1
  • 6
  • 25

0 Answers0