- Update player class
This commit is contained in:
Kum1ta
2024-08-19 00:42:53 +02:00
parent 950abd0943
commit 227327fdf4
35 changed files with 374 additions and 251 deletions

View File

@ -227,6 +227,7 @@ export type ParseAst = (
// declare AbortSignal here for environments without DOM lib or @types/node
declare global {
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
interface AbortSignal {}
}
@ -395,7 +396,6 @@ export type WatchChangeHook = (
* const myPlugin: PluginImpl<Options> = (options = {}) => { ... }
* ```
*/
// eslint-disable-next-line @typescript-eslint/ban-types
export type PluginImpl<O extends object = object, A = any> = (options?: O) => Plugin<A>;
export interface OutputBundle {
@ -505,13 +505,13 @@ type MakeAsync<Function_> = Function_ extends (
? (this: This, ...parameters: Arguments) => Return | Promise<Return>
: never;
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
type ObjectHook<T, O = {}> = T | ({ handler: T; order?: 'pre' | 'post' | null } & O);
export type PluginHooks = {
[K in keyof FunctionPluginHooks]: ObjectHook<
K extends AsyncPluginHooks ? MakeAsync<FunctionPluginHooks[K]> : FunctionPluginHooks[K],
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
K extends ParallelPluginHooks ? { sequential?: boolean } : {}
>;
};
@ -756,6 +756,7 @@ export interface OutputOptions {
strict?: boolean;
systemNullSetters?: boolean;
validate?: boolean;
virtualDirname?: string;
}
export interface NormalizedOutputOptions {
@ -809,6 +810,7 @@ export interface NormalizedOutputOptions {
strict: boolean;
systemNullSetters: boolean;
validate: boolean;
virtualDirname: string;
}
export type WarningHandlerWithDefault = (