refactor(types): moved bun asset module declarations into shared types file
- Removed the obsolete `bun-imports.d.ts` file from `packages/coding-agent/src`. - Consolidated the `*.css`, `*/template.js`, and `*.generated.js` module text-import declarations into `types/assets/index.d.ts`.
This commit is contained in:
-45
@@ -1,45 +0,0 @@
|
||||
/**
|
||||
* Type declarations for Bun's import attributes.
|
||||
* These allow importing non-JS files as text at build time.
|
||||
*/
|
||||
|
||||
// Markdown files imported as text
|
||||
declare module "*.md" {
|
||||
const content: string;
|
||||
export default content;
|
||||
}
|
||||
|
||||
// Text files imported as text
|
||||
declare module "*.txt" {
|
||||
const content: string;
|
||||
export default content;
|
||||
}
|
||||
|
||||
// Python files imported as text
|
||||
declare module "*.py" {
|
||||
const content: string;
|
||||
export default content;
|
||||
}
|
||||
|
||||
// Lark grammar files imported as text
|
||||
declare module "*.lark" {
|
||||
const content: string;
|
||||
export default content;
|
||||
}
|
||||
|
||||
// Session-export template assets imported as text.
|
||||
// No `*.html` declaration: bun-types claims that pattern as HTMLBundle, so the
|
||||
// text import in src/export/html/index.ts casts at the use site instead.
|
||||
declare module "*.css" {
|
||||
const content: string;
|
||||
export default content;
|
||||
}
|
||||
declare module "*/template.js" {
|
||||
const content: string;
|
||||
export default content;
|
||||
}
|
||||
|
||||
declare module "*.generated.js" {
|
||||
const content: string;
|
||||
export default content;
|
||||
}
|
||||
Vendored
+18
@@ -23,6 +23,24 @@ declare module "*.bdf" {
|
||||
export default content;
|
||||
}
|
||||
|
||||
// Session-export template assets imported as text (coding-agent src/export/html).
|
||||
// No `*.html` declaration: bun-types claims that pattern as HTMLBundle, so the
|
||||
// text import casts at the use site instead.
|
||||
declare module "*.css" {
|
||||
const content: string;
|
||||
export default content;
|
||||
}
|
||||
|
||||
declare module "*/template.js" {
|
||||
const content: string;
|
||||
export default content;
|
||||
}
|
||||
|
||||
declare module "*.generated.js" {
|
||||
const content: string;
|
||||
export default content;
|
||||
}
|
||||
|
||||
// turndown-plugin-gfm has no published types
|
||||
declare module "turndown-plugin-gfm" {
|
||||
import type TurndownService from "turndown";
|
||||
|
||||
Reference in New Issue
Block a user