-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.d.ts
More file actions
111 lines (99 loc) · 2.95 KB
/
Copy pathtypes.d.ts
File metadata and controls
111 lines (99 loc) · 2.95 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
declare module 'linaria/rollup.js' {
import { Plugin } from 'rollup'
interface Options {
sourceMap?: boolean
}
const plugin: (opts: Options) => Plugin
export default plugin
}
declare module 'rollup-plugin-css-only' {
import { Plugin } from 'rollup'
interface Options {
output: string
}
const plugin: (opts: Options) => Plugin
export default plugin
}
declare module '@rollup/plugin-url' {
import { Plugin } from 'rollup'
interface Options {
limit?: number
publicPath?: string
include: string | RegExp | (string | RegExp)[]
}
const plugin: (opts?: Options) => Plugin
export default plugin
}
declare module 'mri' {
type Args = string[]
interface Opts {
alias?: Record<string, string | string[]>
boolean?: string | string[]
string?: string | string[]
default?: Record<string, string | number | boolean>
}
function mri(
args?: Args,
opts?: Opts,
): { _: string[]; [key: string]: string | number | boolean }
export default mri
}
declare module 'terser/main' {
export * from 'terser'
}
declare module 'mitt' {
export type EventType = string | symbol
type WildcardHandler<Events> = (
type: keyof Events,
data: Events[keyof Events],
) => void
export interface Emitter<Events extends EventMap> {
/** A Map of event names to registered handler functions */
all: { [K in keyof Events]: (data?: Events[K]) => void }
/** Register an event handler for the given type */
on<T extends keyof Events>(
/** Type of event to listen for, or "*" for all events */
type: T,
/** Function to call in response to given event */
handler: (data: Events[T]) => void,
): void
/** Register an event handler for the given type */
on(
/** Type of event to listen for, or "*" for all events */
type: '*',
/** Function to call in response to given event */
handler: WildcardHandler<Events>,
): void
/** Remove an event handler for the given type */
off<T extends keyof Events>(
/** Type of event to unregister handler from, or "*" */
type: T,
/** Handler function to remove */
handler: (data: Events[T]) => void,
): void
/** Remove an event handler for the given type */
off(
/** Type of event to unregister handler from, or "*" */
type: '*',
/** Handler function to remove */
handler: WildcardHandler<Events>,
): void
/** Invoke all handlers for the given type. If present, "*" handlers are invoked after type-matched handlers */
emit<T extends keyof Events>(
/** The event type to invoke */
type: T,
/** Any value passed to each handler */
event: Events[T],
): void
}
export interface EventMap {
[eventName: EventType]: unknown
}
function mitt<Events extends EventMap>(): Emitter<Events>
export default mitt
}
declare const Comlink: typeof import('comlink')
declare module '*.wasm' {
const outputPath: string
export default outputPath
}