onyxblade / camille

Type-safe data exchange between front-end and Rails

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for index signatures

onyxblade opened this issue · comments

https://www.typescriptlang.org/docs/handbook/2/objects.html#index-signatures

I'm not sure what should be the syntax in Ruby, since {[xxx]: xxx} is not valid Ruby syntax. Probably Dict[Number, String] is more straightforward.

This is implemented as Record type in 0.5.6. Record[Number, String] corresponds to Record<number, string> in Typescript.