Description
LanguageDetail.keywords
are currently defined as
Line 172 in cc93b0e
But we have at least 3 formats:
- Whitespace-separated string as in Cos.
string[]
as in Dockerfile.Record<string, string | string[]>
(plus optional$pattern
) as in Dart.
The 2nd one is illegal in that definition. And the 3rd one is not as specific as it can be.
Should the correct one be string | string[] | Record<string, string | string[]>
?
Same goes for ModeDetail
.
Since we are here, must we really support that variety of definitions? Is there a performance difference in loading that? Or is there no reason to prefer whitespace-separated string over string[]
? Could we change to something like Record<string, string[]>
in version 12? (plus some provision for $pattern: string
, not sure how to code that correctly).
The reason I care is that I am porting your package to Dart, and the porting script for diverse definitions is harder to maintain.