Files
remark42/frontend/app/typings/global.d.ts
T
Pavel MineevandUmputun 5825a55b69 Update frontend
* change root dit and change way to import modules
* update deps to latest versions
* use latest tools for building bundles
* rewrite webpack config
* use nomodule technique for loading modern bundle
* inject polyfills by babel usebuiltins
* update eslint rules
* rename all style files to CSS
* use postcss preset env for building styles
* proper typescript typing
* put all html files to templates folder
* etc
2021-01-12 13:39:26 -06:00

49 lines
1.1 KiB
TypeScript

import 'jest-fetch-mock';
import type { Theme } from 'common/types';
type RemarkConfig = {
host: string;
site_id: string;
url?: string;
max_shown_comments?: number;
theme?: Theme;
page_title?: string;
locale?: string;
show_email_subscription?: boolean;
max_last_comments?: number;
__colors__?: Record<string, string>;
};
declare global {
interface Window {
remark_config: RemarkConfig;
REMARK42: {
changeTheme?: (theme: Theme) => void;
destroy?: () => void;
createInstance: (
remark_config: RemarkConfig
) =>
| {
changeTheme(theme: Theme): void;
destroy(): void;
}
| undefined;
};
}
namespace NodeJS {
interface Global {
Headers: typeof Headers;
localStorage: typeof Storage;
}
}
}
/**
* Veriable responsive for dynamic setting public path for
* assets. Dynamic imports with relative url will be resolved over this path.
*
* https://webpack.js.org/guides/public-path/#on-the-fly
*/
declare let __webpack_public_path__: string;