What does the type "{..}" mean?

As in

@module("express") external jsonMiddlewareWithOptions: {..} => middleware = "json".

That line is from rescript-express/Express.res at main · bloodyowl/rescript-express · GitHub. I don’t see it documented anywhere and google doesn’t help either. Is it a JSON type?


It’s an open object type, essentially like a Record<string, any> in Typescript.

1 Like

Except much safer because it’s still fully typesafe and checked by the compiler at all call sites.

1 Like