initial commit

This commit is contained in:
sockenklaus
2023-06-30 01:29:26 +02:00
commit 6b7fd89313
44 changed files with 29969 additions and 0 deletions

13
contracts/drive.ts Normal file
View File

@@ -0,0 +1,13 @@
/**
* Contract source: https://git.io/JBt3I
*
* Feel free to let us know via PR, if you find something broken in this contract
* file.
*/
import type { InferDisksFromConfig } from '@adonisjs/core/build/config'
import type driveConfig from '../config/drive'
declare module '@ioc:Adonis/Core/Drive' {
interface DisksList extends InferDisksFromConfig<typeof driveConfig> {}
}

23
contracts/env.ts Normal file
View File

@@ -0,0 +1,23 @@
/**
* Contract source: https://git.io/JTm6U
*
* Feel free to let us know via PR, if you find something broken in this contract
* file.
*/
declare module '@ioc:Adonis/Core/Env' {
/*
|--------------------------------------------------------------------------
| Getting types for validated environment variables
|--------------------------------------------------------------------------
|
| The `default` export from the "../env.ts" file exports types for the
| validated environment variables. Here we merge them with the `EnvTypes`
| interface so that you can enjoy intellisense when using the "Env"
| module.
|
*/
type CustomTypes = typeof import('../env').default
interface EnvTypes extends CustomTypes {}
}

31
contracts/events.ts Normal file
View File

@@ -0,0 +1,31 @@
/**
* Contract source: https://git.io/JfefG
*
* Feel free to let us know via PR, if you find something broken in this contract
* file.
*/
declare module '@ioc:Adonis/Core/Event' {
/*
|--------------------------------------------------------------------------
| Define typed events
|--------------------------------------------------------------------------
|
| You can define types for events inside the following interface and
| AdonisJS will make sure that all listeners and emit calls adheres
| to the defined types.
|
| For example:
|
| interface EventsList {
| 'new:user': UserModel
| }
|
| Now calling `Event.emit('new:user')` will statically ensure that passed value is
| an instance of the the UserModel only.
|
*/
interface EventsList {
//
}
}

13
contracts/hash.ts Normal file
View File

@@ -0,0 +1,13 @@
/**
* Contract source: https://git.io/Jfefs
*
* Feel free to let us know via PR, if you find something broken in this contract
* file.
*/
import type { InferListFromConfig } from '@adonisjs/core/build/config'
import type hashConfig from '../config/hash'
declare module '@ioc:Adonis/Core/Hash' {
interface HashersList extends InferListFromConfig<typeof hashConfig> {}
}

18
contracts/tests.ts Normal file
View File

@@ -0,0 +1,18 @@
/**
* Contract source: https://bit.ly/3DP1ypf
*
* Feel free to let us know via PR, if you find something broken in this contract
* file.
*/
import '@japa/runner'
declare module '@japa/runner' {
interface TestContext {
// Extend context
}
interface Test<TestData> {
// Extend test
}
}