-
Couldn't load subscription status.
- Fork 1.7k
Closed
Labels
area-languageDart language related items (some items might be better tracked at github.com/dart-lang/language).Dart language related items (some items might be better tracked at github.com/dart-lang/language).core-atype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug
Description
In the dom library there are several types which are sum (union) types.
IDBKey and SerializedScriptValue are two examples - both include numbers, strings and JavaScript arrays (Lists) among other things, and neither includes functions or arbitrary user defined types.
We are forced to use Dynamic for these types.
If typedef could do a simple renaming we could generate more readable interfaces.
e.g.
interface IDBFactory {
int cmp(Dynamic first, Dynamic second);
}
could become
/** Documentation about IDBKey in one place. */
typedef IDBKey = Dynamic;
interface IDBFactory {
int cmp(IDBKey first, IDBKey second); // Tools can navigate to the definition.
}
rkj, buhhy, alexbecker, mockturtl, koliyo and 91 more
Metadata
Metadata
Assignees
Labels
area-languageDart language related items (some items might be better tracked at github.com/dart-lang/language).Dart language related items (some items might be better tracked at github.com/dart-lang/language).core-atype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug