How to associate a lambda layer with a function in serverless.ts typescript using Ref

I use serverless framework and i use the typescript template which generates a serverless.ts file.

I am working with lambda layers and im tyring to associate a lambda layer i have created with an existing function. However im getting a typescript error.

Type ‘{ Ref: string; }’ is not assignable to type ‘AwsLambdaLayers’.
Object literal may only specify known properties, and ‘Ref’ does not exist in type ‘AwsArn’.

    functions: {
        main: {
            handler: "handler.MainHandler",
            timeout: 300,
            layers: {
                Ref: "PrismaLambdaLayer",

  layers: {
        prisma: {
            path: ".prisma-layer",
            description: "Layer for prisma clients",
            package: {
                patterns: [

Looks like we can just do

layers: [{ Ref: "PrismaLambdaLayer" }],