mirror of
https://github.com/go-gitea/gitea.git
synced 2025-09-19 23:52:49 +02:00
Update eslint and all plugins. Many plugins still do not ship type definitions so I had to add stubs. Also, I had to put a few typescript error expectations because if some unknown error in the types. `eslint-plugin-no-jquery` is disabled because it's not compatible with eslint 9 flat config (https://github.com/wikimedia/eslint-plugin-no-jquery/issues/311).
11 lines
298 B
TypeScript
11 lines
298 B
TypeScript
export type FileRenderPlugin = {
|
|
// unique plugin name
|
|
name: string;
|
|
|
|
// test if plugin can handle a specified file
|
|
canHandle: (filename: string, mimeType: string) => boolean;
|
|
|
|
// render file content
|
|
render: (container: HTMLElement, fileUrl: string, options?: any) => Promise<void>;
|
|
};
|