Home:ALL Converter>how to fix typescript eslint error: Parsing error: Type expected

how to fix typescript eslint error: Parsing error: Type expected

Ask Time:2021-08-30T12:32:55         Author:user6785574

Json Formatter

typescript support string literal union type from enum,but eslint with error,how to fix??

enum Kind {
  'info' = 'info',
  'positive' = 'positive',
  'negative' = 'negative',
  'warning' = 'warning',
}
export type KindType = `${Kind}`;

eslint error in export type KindType = ${Kind};

{
    "owner": "eslint",
    "message": "Parsing error: Type expected.",
    "source": "eslint"
}

Author:user6785574,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/68978963/how-to-fix-typescript-eslint-error-parsing-error-type-expected
yy