For example, a variable of type
type Path = string & { __pathBrand: any };
cannot be used as an indexer type, and cannot be used to index an object with a string type indexer (despite being safely usable as a string in all other locations).
If an intersection type contains types which are valid for use in an index signature, then the intersection type itself should probably be valid as an index signature.
For example, a variable of type
cannot be used as an indexer type, and cannot be used to index an object with a
stringtype indexer (despite being safely usable as astringin all other locations).If an intersection type contains types which are valid for use in an index signature, then the intersection type itself should probably be valid as an index signature.