Skip to content

Commit

Permalink
fix(vinejs): add exists and unique bindings to VineNumber strin…
Browse files Browse the repository at this point in the history
…g as well
  • Loading branch information
Tahul committed Feb 5, 2024
1 parent c487b1a commit cb78f1a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion providers/database_provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ declare module '@adonisjs/core/test_utils' {
* Extending VineJS schema types
*/
declare module '@vinejs/vine' {
export interface VineString {
interface VineLucidBindings {
/**
* Ensure the value is unique inside the database by self
* executing a query.
Expand All @@ -58,6 +58,10 @@ declare module '@vinejs/vine' {
*/
exists(callback: (db: Database, value: string, field: FieldContext) => Promise<boolean>): this
}

interface VineNumber extends VineLucidBindings {}

interface VineString extends VineLucidBindings {}
}

/**
Expand Down

0 comments on commit cb78f1a

Please sign in to comment.