mirror of
https://github.com/withastro/astro.git
synced 2024-12-30 22:03:56 -05:00
fix: move db ambient types to separate module (#10340)
* fix: move ambient types to separate modue * chore: changeset
This commit is contained in:
parent
038201fbae
commit
a60861c960
4 changed files with 16 additions and 5 deletions
5
.changeset/dry-pants-act.md
Normal file
5
.changeset/dry-pants-act.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
"@astrojs/db": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Ensure `astro:db` types exist in your `db/config.ts` before running type generation.
|
6
packages/db/index.d.ts
vendored
6
packages/db/index.d.ts
vendored
|
@ -1,5 +1,3 @@
|
||||||
export { default, cli } from './dist/index.js';
|
import './virtual.js';
|
||||||
|
|
||||||
declare module 'astro:db' {
|
export { default, cli } from './dist/index.js';
|
||||||
export { defineTable, defineDB, column, sql, NOW, TRUE, FALSE } from './dist/index.js';
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
export type { ResolvedCollectionConfig, TableConfig } from './core/types.js';
|
export type { ResolvedCollectionConfig, TableConfig } from './core/types.js';
|
||||||
export { cli } from './core/cli/index.js';
|
export { cli } from './core/cli/index.js';
|
||||||
export { integration as default } from './core/integration/index.js';
|
export { integration as default } from './core/integration/index.js';
|
||||||
export { sql, NOW, TRUE, FALSE, defineDB, defineTable, column } from './runtime/config.js';
|
|
||||||
|
|
9
packages/db/virtual.d.ts
vendored
Normal file
9
packages/db/virtual.d.ts
vendored
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
declare module 'astro:db' {
|
||||||
|
export const sql: typeof import('./dist/runtime/config.js').sql;
|
||||||
|
export const NOW: typeof import('./dist/runtime/config.js').NOW;
|
||||||
|
export const TRUE: typeof import('./dist/runtime/config.js').TRUE;
|
||||||
|
export const FALSE: typeof import('./dist/runtime/config.js').FALSE;
|
||||||
|
export const column: typeof import('./dist/runtime/config.js').column;
|
||||||
|
export const defineDB: typeof import('./dist/runtime/config.js').defineDB;
|
||||||
|
export const defineTable: typeof import('./dist/runtime/config.js').defineTable;
|
||||||
|
}
|
Loading…
Reference in a new issue