forgor to add tsconfig

This commit is contained in:
Vendicated 2023-04-05 16:56:33 +02:00
parent 9d144a11be
commit f357ee4260
No known key found for this signature in database
GPG key ID: A1DC0CFB5615D905
4 changed files with 19 additions and 3 deletions

View file

@ -1 +0,0 @@
export const localStorage = window.localStorage;

View file

@ -1,11 +1,11 @@
import "./hideGarbage.css"; import "./hideGarbage.css";
import { isFirstRun } from "./utilts"; import { isFirstRun } from "./utils";
// Make clicking Notifications focus the window // Make clicking Notifications focus the window
const originalSetOnClick = Object.getOwnPropertyDescriptor(Notification.prototype, "onclick")!.set!; const originalSetOnClick = Object.getOwnPropertyDescriptor(Notification.prototype, "onclick")!.set!;
Object.defineProperty(Notification.prototype, "onclick", { Object.defineProperty(Notification.prototype, "onclick", {
set(onClick) { set(onClick) {
originalSetOnClick.call(this, function () { originalSetOnClick.call(this, function (this: unknown) {
onClick.apply(this, arguments); onClick.apply(this, arguments);
VencordDesktop.win.focus(); VencordDesktop.win.focus();
}); });
@ -13,6 +13,7 @@ Object.defineProperty(Notification.prototype, "onclick", {
configurable: true configurable: true
}); });
// Enable Desktop Notifications by default
if (isFirstRun) { if (isFirstRun) {
Vencord.Webpack.waitFor("setDesktopType", m => { Vencord.Webpack.waitFor("setDesktopType", m => {
m.setDesktopType("all"); m.setDesktopType("all");

16
tsconfig.json Normal file
View file

@ -0,0 +1,16 @@
{
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"lib": ["DOM", "DOM.Iterable", "esnext", "esnext.array", "esnext.asynciterable", "esnext.symbol"],
"module": "commonjs",
"moduleResolution": "node",
"strict": true,
"noImplicitAny": false,
"target": "ESNEXT",
"jsx": "preserve",
"baseUrl": "./src/"
},
"include": ["src/**/*"]
}