-
Notifications
You must be signed in to change notification settings - Fork 533
Expand file tree
/
Copy pathtext-imports.d.ts
More file actions
36 lines (32 loc) · 1.01 KB
/
text-imports.d.ts
File metadata and controls
36 lines (32 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Bun text loader: import X from './file.md' resolves to a string at build time
declare module '*.md' {
const content: string
export default content
}
declare module '*.txt' {
const content: string
export default content
}
// Make React namespace available globally for .ts files that use React.ReactNode
// without explicitly importing React
declare namespace React {
type ReactNode = import('react').ReactNode
type RefObject<T> = import('react').RefObject<T>
type MutableRefObject<T> = import('react').MutableRefObject<T>
type Dispatch<A> = import('react').Dispatch<A>
type SetStateAction<S> = import('react').SetStateAction<S>
}
// React Compiler runtime - provides caching primitives used by React Compiler output
declare module 'react/compiler-runtime' {
export function c(size: number): any[]
}
// Ink custom JSX intrinsic elements
declare namespace JSX {
interface IntrinsicElements {
'ink-box': any
'ink-text': any
'ink-link': any
'ink-root': any
'ink-virtual-text': any
}
}