Open zspitz opened 7 years ago
Simulate default properties:
var rst: DAO.Recordset;
var lastName: string = rst('LastName');
would map to
var rst: DAO.Recordset;
var lastName: string = rst.Fields('LastName').Value;
because we know the type of lastName
, we can step through the default property chain (Fields
, Value
) until we reach a compatible property. Alternatively, the default property chain should be followed until the end, and lastName
would have the type of .Value
.
would map to
would map to
would map to a helper function:
would map to something like
This would have to handle the difference between 0-based and 1-based collections, and also sometimes where the key is not a number or string
https://github.com/Microsoft/TypeScript/issues/6508