mirror of
https://github.com/outline/outline.git
synced 2026-11-21 13:34:02 +03:00
* chore: Reduce no-explicit-any warnings in server directory Tightens types across test response bodies, decorator signatures, the TestServer wrapper, base class generics, and presenter Record types. Where any is genuinely load-bearing (Sequelize model generics, PropertyDescriptor decorator returns, plugin-registered template classes, Fix mixin), keeps any with a targeted eslint-disable plus reason rather than masking the constraint. Cuts server-only no-explicit-any warnings from 162 to 70. * fix: groups test asserts on first response instead of second Caught by Copilot review on the no-explicit-any cleanup. Also fixes the pre-existing getChangsetSkipped → getChangesetSkipped typo surfaced while reviewing nearby decorator code.
31 lines
677 B
TypeScript
31 lines
677 B
TypeScript
import {
|
|
CreatedAt,
|
|
UpdatedAt,
|
|
Column,
|
|
PrimaryKey,
|
|
IsUUID,
|
|
DataType,
|
|
Default,
|
|
} from "sequelize-typescript";
|
|
import Model from "./Model";
|
|
|
|
class IdModel<
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- mirrors Model base; tightening to object resolves Attributes<M> to never inside Sequelize helpers.
|
|
TModelAttributes extends object = any,
|
|
TCreationAttributes extends object = TModelAttributes,
|
|
> extends Model<TModelAttributes, TCreationAttributes> {
|
|
@IsUUID(4)
|
|
@PrimaryKey
|
|
@Default(DataType.UUIDV4)
|
|
@Column(DataType.UUID)
|
|
id: string;
|
|
|
|
@CreatedAt
|
|
createdAt: Date;
|
|
|
|
@UpdatedAt
|
|
updatedAt: Date;
|
|
}
|
|
|
|
export default IdModel;
|