Yui
Yui4w ago

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;
}
1 Reply
Yui
Yui4w ago
nvm found it
"compilerOptions": {
"experimentalDecorators": true
}
"compilerOptions": {
"experimentalDecorators": true
}