ZabiZ
Denoβ€’16mo agoβ€’
1 reply
Zabi

Decorators are not valid here.deno-ts(1206)

I just updated deno after like a year maybe and now I am seeing this.

Do I need to turn on some config option or something to use decorators?

Thanks

import { Column, DataType, InferAttributes, InferCreationAttributes, Model, Table } from "../../deps.ts";

@Table
export class CommandVersion extends Model<
  InferAttributes<CommandVersion>,
  InferCreationAttributes<CommandVersion>
> {
  @Column({
    type: DataType.BIGINT,
    primaryKey: true,
  })
  declare id: bigint;
  @Column(DataType.INTEGER)
  declare version: number;
}
Was this page helpful?