#square brackets in type reference: ExtArgs['result']['aPIKey']

6 messages · Page 1 of 1 (latest)

velvet matrix
#

I saw this:

ExtArgs['result']['aPIKey']

In someone's type definition. It looks like its accessing a hierarchical type object. What is this called and where can I learned more about it?

brave crypt
#

"indexed access"

#

!hb indexed access

urban swanBOT
velvet matrix
#

thanks!

brave crypt
#

it's similar to what ['foo'] or .foo means in value-space, except for types. your example means "the type of the property named aPIKey within the property named result of the ExtArgs type". here's a simpler example: