-
Notifications
You must be signed in to change notification settings - Fork 13.4k
JSDoc: error TS1005 when using conditional type in @typedef #37166
Copy link
Copy link
Closed
Labels
Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureThis means we'd like to hear from more people who would be helped by this featureBugA bug in TypeScriptA bug in TypeScriptDesign LimitationConstraints of the existing architecture prevent this from being fixedConstraints of the existing architecture prevent this from being fixed
Metadata
Metadata
Assignees
Labels
Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureThis means we'd like to hear from more people who would be helped by this featureBugA bug in TypeScriptA bug in TypeScriptDesign LimitationConstraints of the existing architecture prevent this from being fixedConstraints of the existing architecture prevent this from being fixed
Type
Fields
Give feedbackNo fields configured for issues without a type.
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
'?' expectedappears. You can see that error on the Playground's Errors tab.Related Issues:
Code
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