Closed
Description
TypeScript Version: 3.9.0-dev.20200229
Search Terms: JSDoc typedef
Expected behavior: compile javascript JSDoc without any errors
Actual behavior: Actually, tsc compiles correct d.ts type, but annoying error '?' expected
appears. You can see that error on the Playground's Errors tab.
Related Issues:
Code
/**
* @template T
* @typedef {{[K in keyof T]: T[K] extends Function ? K : never}[keyof T]} FunctionProperties
*/
Compiler Options
{
"compilerOptions": {
"noImplicitAny": true,
"strictFunctionTypes": true,
"strictPropertyInitialization": true,
"strictBindCallApply": true,
"noImplicitThis": true,
"noImplicitReturns": true,
"alwaysStrict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"esModuleInterop": true,
"checkJs": true,
"allowJs": true,
"declaration": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"moduleResolution": 2,
"target": "ES2017",
"jsx": "React",
"module": "ESNext"
}
}
Playground Link: Provided