-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f8b2130
commit ffd215d
Showing
5 changed files
with
315 additions
and
286 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// this file will be overwritten | ||
import type {} from '@aeriajs/types' | ||
|
||
declare global { | ||
type UnpackCollections<TCollections> = { | ||
[P in keyof TCollections]: TCollections[P] extends infer Candidate | ||
? Candidate extends (...args: any[]) => infer Coll | ||
? Coll | ||
: Candidate | ||
: never | ||
} | ||
|
||
type Collections = typeof import('../src/index.ts') extends infer EntrypointModule | ||
? 'collections' extends keyof EntrypointModule | ||
? UnpackCollections<EntrypointModule['collections']> | ||
: 'default' extends keyof EntrypointModule | ||
? EntrypointModule['default'] extends infer Entrypoint | ||
? 'options' extends keyof Entrypoint | ||
? 'collections' extends keyof Entrypoint['options'] | ||
? UnpackCollections<Entrypoint['options']['collections']> | ||
: never | ||
: never | ||
: never | ||
: never | ||
: never | ||
} | ||
|
||
declare module 'aeria' { | ||
import type { Context } from 'aeria' | ||
export const createAeria: () => Promise<Context> | ||
export const aeria: Context | ||
} | ||
// |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.