-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Labels
Description
Describe the issue
In the type parameter "OutT", the "Out" is highlighted differently from the "T".
Which language seems to have the issue?
typescript
Are you using highlight or highlightAuto?
Not sure. I noticed this issue on StackOverflow and reproduced with your JSFiddle template.
Sample Code to Reproduce
https://jsfiddle.net/650rLwyd/
Screenshot:
Expected behavior
GitHub's highlighting in markdown code fences looks better:
type ParseFunc<OutT, InT> = (val: InT) => OutT;
declare const parseString: ParseFunc<string, unknown>;
declare const makeParseObject: <FPs extends {[s: string]: ParseFunc<any, any>}> (fieldParsers: FPs)
=> ParseFunc<ParseObjectResult<FPs>, unknown>;
type ParseObjectResult<FPs extends {[s: string]: ParseFunc<any, unknown>}> =
{[F in keyof FPs]: ParseResult<FPs[F]>}
type ParseResult<P> = P extends ParseFunc<infer OutT, unknown> ? OutT : never;Screenshot, just in case it changes:
Additional context

