Files
TypeScript/src
Nathan Shively-Sanders cfd97da680 Infer keyof from string literals + contravariantly
1. When inferring from a string literal [union] type to a index type,
infer a object type with properties whose names match the constituents of the
union type. The type of all the properties is `{}`.
2. Infer index types contravariantly.

For example, when inferring `"foo" | "bar"` to `keyof T`, the inference
algorithm now infers `{ foo: {}, bar: {} }` to `T`. When inferring
`string` to `keyof T`, the inference algorithm now infers `{ [s:
string]: {} }` to `T`.
2017-10-16 13:31:23 -07:00
..
2017-10-13 16:47:40 -07:00