diff --git a/.gitignore b/.gitignore index e1da6ae..f75efae 100644 --- a/.gitignore +++ b/.gitignore @@ -74,3 +74,5 @@ typings/ # FuseBox cache .fusebox/ + +dist \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index cbd5253..2876380 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,9 @@ "dependencies": { "discord.js": "^13.6.0", "ts-results": "^3.3.0" + }, + "devDependencies": { + "typescript": "^4.5.5" } }, "node_modules/@discordjs/builders": { @@ -216,6 +219,19 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" }, + "node_modules/typescript": { + "version": "4.5.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", + "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", @@ -411,6 +427,12 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" }, + "typescript": { + "version": "4.5.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", + "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", + "dev": true + }, "webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", diff --git a/package.json b/package.json index bf0ddee..a3382eb 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "sernhandler2", + "name": "@jacoobes/sern", "version": "1.0.0", "description": "", "main": "dist/index.js", @@ -13,5 +13,8 @@ "dependencies": { "discord.js": "^13.6.0", "ts-results": "^3.3.0" + }, + "devDependencies": { + "typescript": "^4.5.5" } } diff --git a/src/types/handler/handler.d.ts b/src/types/handler/handler.ts similarity index 94% rename from src/types/handler/handler.d.ts rename to src/types/handler/handler.ts index 4334466..195e953 100644 --- a/src/types/handler/handler.d.ts +++ b/src/types/handler/handler.ts @@ -1,6 +1,7 @@ import type { Ok, Result } from 'ts-results'; import type { Awaitable, Client, Message, MessagePayload} from 'discord.js'; import type { MessageOptions } from 'child_process'; +import type Sern from '../..'; export type Visibility = "private" | "public" export type possibleOutput = string | MessagePayload & MessageOptions @@ -14,6 +15,4 @@ export type delegate = Sern.Module["delegate"] export enum CommandType { TEXT = 0b00000001 << 0b00000001, SLASH = 0b00000001 << 0b00000010, -} - -declare class MsgHandler {} \ No newline at end of file +} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index b39ee68..fc47586 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,6 +11,7 @@ "strictNullChecks": true, "importsNotUsedAsValues": "error", "skipLibCheck": true, + "declaration": true, "forceConsistentCasingInFileNames": true } }