-
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
b5a8ee7
commit fe35d4d
Showing
4 changed files
with
200 additions
and
51 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 useAeria: () => 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.
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 |
---|---|---|
|
@@ -21,6 +21,7 @@ | |
"typescript": "^5.4.0-beta" | ||
}, | ||
"dependencies": { | ||
"aeria": "^0.0.66", | ||
"husky": "^9.0.10" | ||
} | ||
} |
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