I tried guessing a few syntax combinations, but none would compile. Is this possible?
No, UnityScript ia a proprietary language which is build on top of Mono, but they didn't support all features. You can declare "normal" properties, but only when you have an explicit class construct around it and only simple, non-indexed.
I've tried different ways to declare an Indexer like you want and had no luck yet ;)
This is a rarely used feature of C# so i don't think they implement it in UnityScript. You have to use methods instead.
btw. your Employee example is not very convenient ;)
A good use of an indexer is the Vector3 struct:
answered May 02 '12 at 11:16 AM