Skip to content
This repository has been archived by the owner on Jan 12, 2023. It is now read-only.

Add types declaration file (resolve #46) #51

Closed
wants to merge 6 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
declare module 'objection-hashid' {
import { Model } from 'objection-2';
import { QueryBuilder } from 'knex';

class HashIdExtensionClass extends Model {
static get hashIdSalt(): string;

static get hashIdMinLength(): number | void;

static get hashIdAlphabet(): string | void;

static get hashIdSeps(): string | void;

static get _hashIdInstance(): string;
geopic marked this conversation as resolved.
Show resolved Hide resolved

get hashId(): string;

get hashid(): string;

static get hashIdField(): string;

static get hashedFields(): Array<any>;
geopic marked this conversation as resolved.
Show resolved Hide resolved

$formatJson(obj: object): object;
geopic marked this conversation as resolved.
Show resolved Hide resolved
}

export default function (model: new (...args: any[]) => Model): new (...args: any[]) => HashIdExtensionClass;
geopic marked this conversation as resolved.
Show resolved Hide resolved
}