wwwouter / typed-knex

A TypeScript wrapper for Knex.js
MIT License
112 stars 13 forks source link

Table decorator is incorrectly marked as deprecated #65

Closed isRyven closed 1 year ago

isRyven commented 1 year ago

Issue type:

[ ] Question [x] Bug report [ ] Feature request [ ] Documentation issue

Database system/driver:

[x] Postgres [ ] MSSQL [ ] MySQL [ ] MariaDB [ ] SQLite3 [ ] Oracle [ ] Amazon Redshift

typed-knex version:

[ ] latest [ ] @next [x] 4.13.0

Knex.js version: 2.2.0

Typescript version: 4.7.4

Steps to reproduce or a small repository showing the problem:

I have block like this, which i've built following the documentation:

import { Column, Table } from '@wwwouter/typed-knex';

@Table('user')
class User {
    @Column({ primary: true })
    public id: number;
    @Column()
    public username: string;
    @Column()
    public email: string;
    @Column({ name: 'first_name' })
    public firstName: string;
    @Column({ name: 'last_name' })
    public lastName: string;
}

But my vscode keeps showing a warning that the Table decorator is deprecated. Table is deprecated. use Table.

image

wwwouter commented 1 year ago

Table was using Entity, and I think sonarlint thought Table should be deprecated as well. I changed it in v4.13.1, could you test to see if this removes the warning?

isRyven commented 1 year ago

Thank you for your quick reaction kind sir, it has indeed resolved the issue!