You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 16, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 16, 2026. It is now read-only.
type ReactType<P = any> =
{
[K in keyof JSX.IntrinsicElements]: P extends JSX.IntrinsicElements[K] ? K : never
}[keyof JSX.IntrinsicElements] |
ComponentType<P>;
any, JSX.IntrinsicElements, P, K, never, ComponentType should be highlighted as type keyof should be highlighted as keyword
Issue 2:
interface FunctionComponentElement<P> extends ReactElement<P> {
ref?: 'ref' extends keyof P ? P extends { ref?: infer R } ? R : never : never;
}
P, R, never should be highlighted as type infer should be highlighted as keyword
If the property is between round bracket highlighting is not correct.
Issue 5:
type ContextType<C extends Context<any>> = C extends Context<infer T> ? T : never;
type Provider<T> = ProviderExoticComponent<ProviderProps<T>>;
infer should be highlighted as keyword T, never should be highlighted as type
Highlighting of second line is broken but it seems because the previous line is not rendered correctly.
interfaceHTMLAttributes<T>extendsDOMAttributes<T>{/** Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. */'aria-activedescendant'?: string;/** Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. */'aria-atomic'?: boolean|'false'|'true';}interfaceIntrinsicElements{"var": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>,HTMLElement>;switch: React.SVGProps<SVGSwitchElement>;}
Types after quoted properties in interfaces aren't handled correctly.
Activity
ficristo commentedon Jan 20, 2019
Issue 7:
Types after quoted properties in interfaces aren't handled correctly.
ficristo commentedon Jan 21, 2019
Thank you!
[javascript mode] Fix typescript [key in ...] syntax (again)
[javascript mode] Improve TypeScript support
[javascript mode] Fix typescript [key in ...] syntax (again)
Update from master (#1)
[javascript mode] Improve TypeScript support