@nestia/sdk
Version:
Nestia SDK and Swagger generator
23 lines (19 loc) • 498 B
text/typescript
import { hash } from "tstl";
import ts from "typescript";
export class TypeEntry {
public constructor(
public readonly type: ts.Type,
public readonly nullable: boolean,
public readonly required: boolean,
) {}
public equals(obj: TypeEntry): boolean {
return (
this.type === obj.type &&
this.nullable === obj.nullable &&
this.required === obj.required
);
}
public hashCode(): number {
return hash(this.type, this.nullable, this.required);
}
}