DenoDDeno
Powered by
ZabiZ
Denoβ€’2y 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;
}
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;
}
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Deno / Zod / ts-zod-decorators
BloxezBBloxez / help
2y ago
Decorators on Deno
The NexusTThe Nexus / help
4y ago
Decorators with esbuild-deno-loader
bennypBbennyp / help
11mo ago
Deno ts
SmorSSmor / help
3y ago