|
| 1 | +/* eslint-disable @typescript-eslint/no-explicit-any */ |
| 2 | +/* eslint-disable @typescript-eslint/no-unsafe-function-type */ |
| 3 | +/* eslint-disable @typescript-eslint/no-empty-object-type */ |
| 4 | +/* eslint-disable @typescript-eslint/no-unused-vars */ |
| 5 | +// Type stubs for optional peer dependencies during build |
| 6 | +// These allow TypeScript to compile without having the actual packages installed |
| 7 | +// This file provides minimal type definitions to satisfy TypeScript when peer dependencies are not installed |
| 8 | + |
| 9 | +// Svelte 5 runes support |
| 10 | +declare function $state<T>(initial: T): T; |
| 11 | +declare function $effect(fn: () => void | (() => void)): void; |
| 12 | +declare function $derived<T>(fn: () => T): T; |
| 13 | + |
| 14 | +// Solid JSX namespace augmentation |
| 15 | +declare namespace JSX { |
| 16 | + interface IntrinsicElements { |
| 17 | + div: { |
| 18 | + ref?: any; |
| 19 | + class?: string; |
| 20 | + className?: string; |
| 21 | + style?: any; |
| 22 | + children?: any; |
| 23 | + [key: string]: any; |
| 24 | + }; |
| 25 | + [elemName: string]: any; |
| 26 | + } |
| 27 | +} |
| 28 | + |
| 29 | +declare module '@angular/core' { |
| 30 | + export interface Type<T> extends Function { |
| 31 | + new (...args: any[]): T; |
| 32 | + } |
| 33 | + export interface SimpleChange { |
| 34 | + firstChange: boolean; |
| 35 | + previousValue: any; |
| 36 | + currentValue: any; |
| 37 | + isFirstChange(): boolean; |
| 38 | + } |
| 39 | + export interface SimpleChanges { |
| 40 | + [propName: string]: SimpleChange; |
| 41 | + } |
| 42 | + export class EventEmitter<T> { |
| 43 | + emit(value?: T): void; |
| 44 | + subscribe(generatorOrNext?: any, error?: any, complete?: any): any; |
| 45 | + } |
| 46 | + export class ElementRef<T = any> { |
| 47 | + nativeElement: T; |
| 48 | + } |
| 49 | + export interface OnInit { |
| 50 | + ngOnInit(): void; |
| 51 | + } |
| 52 | + export interface OnDestroy { |
| 53 | + ngOnDestroy(): void; |
| 54 | + } |
| 55 | + export interface OnChanges { |
| 56 | + ngOnChanges(changes: SimpleChanges): void; |
| 57 | + } |
| 58 | + export const ChangeDetectionStrategy: { |
| 59 | + OnPush: number; |
| 60 | + Default: number; |
| 61 | + }; |
| 62 | + export function Component(obj: any): any; |
| 63 | + export function Input(obj?: any): any; |
| 64 | + export function Output(obj?: any): any; |
| 65 | + export function ViewChild(selector: string | Type<any>, opts?: any): any; |
| 66 | + export function inject<T>(token: Type<T> | any): T; |
| 67 | + export function signal<T>(initialValue: T): any; |
| 68 | +} |
| 69 | + |
| 70 | +declare module 'solid-js' { |
| 71 | + export interface Component<P = {}> { |
| 72 | + (props: P): any; |
| 73 | + } |
| 74 | + export namespace JSX { |
| 75 | + export interface CSSProperties { |
| 76 | + [key: string]: string | number | undefined; |
| 77 | + } |
| 78 | + export interface Element {} |
| 79 | + export interface IntrinsicElements { |
| 80 | + div: any; |
| 81 | + [elemName: string]: any; |
| 82 | + } |
| 83 | + } |
| 84 | + export function createSignal<T>(initialValue: T): [() => T, (v: T) => void]; |
| 85 | + export function createEffect(fn: () => void): void; |
| 86 | + export function onMount(fn: () => void): void; |
| 87 | + export function onCleanup(fn: () => void): void; |
| 88 | + export function mergeProps<T extends object, U extends object>(defaults: Partial<T>, props: U): T & U; |
| 89 | + export function mergeProps<A extends object, B extends object, C extends object>(a: A, b: B, c: C): A & B & C; |
| 90 | + export function mergeProps(...args: any[]): any; |
| 91 | +} |
| 92 | + |
| 93 | +declare module 'svelte' { |
| 94 | + export class SvelteComponent<Props = any, Events = any, Slots = any> { |
| 95 | + constructor(options: any); |
| 96 | + $on(event: string, handler: (e: any) => any): () => void; |
| 97 | + $set(props: Partial<Props>): void; |
| 98 | + $destroy(): void; |
| 99 | + } |
| 100 | + export function onMount(fn: () => any): void; |
| 101 | + export function onDestroy(fn: () => any): void; |
| 102 | + export function createEventDispatcher<T = any>(): (event: string, detail?: any) => void; |
| 103 | +} |
| 104 | + |
| 105 | +declare module './svelte.svelte' { |
| 106 | + const component: any; |
| 107 | + export default component; |
| 108 | +} |
0 commit comments