typescriptification finalization

typescript
Drake 2 years ago
parent e8722c4999
commit 22eec8797f

2
dist/build.js vendored

File diff suppressed because one or more lines are too long

@ -2,7 +2,7 @@
"name": "demoncord-rewrite",
"version": "0.0.1",
"description": "A client mod for sinners.",
"main": "src/index.js",
"main": "src/index.ts",
"scripts": {
"build": "rollup --config rollup.config.js",
"watch": "node watchbuild"

@ -44,7 +44,7 @@ export default defineConfig({
find: "react",
replacement: resolvePath(
projectRootDir,
"src/shim_react.js"
"src/shim_react.ts"
)
}
]

@ -1,8 +1,6 @@
import webpack from "./webpack.js";
import { instead } from "./patcher.js";
import { leak } from "./utils/memory.js";
import webpack from "./webpack";
import { instead } from "./patcher";
import { leak } from "./utils/memory";
type Sins = Record<string, (() => void) | null>

@ -1,7 +1,7 @@
import webpack from "../../webpack";
import { after } from "../../patcher";
import plugins from "./plugins.js";
import hummus from "./hummus.js";
import plugins from "./plugins";
import hummus from "./hummus";
import css from "../../css";
import { React } from "../../common";

9
src/global.d.ts vendored

@ -12,11 +12,14 @@ interface Nest<Schema> {
emit: any
}
const demon: {
type DemonGlobal = {
summon: (mod: string) => any
}
const demon: DemonGlobal
interface Window {
demon: DemonGlobal
beelzejuice: Uint8Array[]
webpackChunkdiscord_app: any
webpackJsonp: (thing1: [], thing2: [(mod: any, _exports: any, req: any) => void]) => any
@ -31,4 +34,6 @@ namespace JSX {
label: any
span: any
}
}
}
const _: any

@ -11,7 +11,7 @@ Object.assign(webpack, {
findByRitual
});
const demon = {
const demon: Record<string, any> = {
modules: {
webpack,
common
@ -37,7 +37,7 @@ const demon = {
settings
};
function summon(mod) {
function summon(mod: string) {
const mods = mod.split("/");
let res = demon;
mods.forEach((m) => {
Loading…
Cancel
Save