Skip to content

Commit 7e7074a

Browse files
committedMar 23, 2024··
fix: actually fix type bundle
1 parent ec01e4b commit 7e7074a

File tree

7 files changed

+9
-59
lines changed

7 files changed

+9
-59
lines changed
 

‎package.json

-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"bump": "cliff-jumper",
3030
"check-update": "cliff-jumper --dry-run",
3131
"prepack": "yarn build && concurrently \"yarn:prepack:*\"",
32-
"prepack:clean-types": "tsx scripts/cleanup-dts-files.mts",
3332
"prepack:cjs": "rollup-type-bundler -d dist/cjs -ot .cts",
3433
"prepack:esm": "rollup-type-bundler -d dist/esm -t .mts"
3534
},
@@ -72,7 +71,6 @@
7271
"lint-staged": "^15.2.2",
7372
"prettier": "^3.2.5",
7473
"tsup": "^8.0.2",
75-
"tsx": "^4.7.1",
7674
"typedoc": "^0.25.12",
7775
"typedoc-json-parser": "^9.0.1",
7876
"typescript": "^5.4.3",

‎scripts/cleanup-dts-files.mts

-20
This file was deleted.

‎src/lib/SapphireClient.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { container, Store, StoreRegistry } from '@sapphire/pieces';
22
import type { Awaitable } from '@sapphire/utilities';
33
import { Client, type ClientOptions, type Message, type Snowflake } from 'discord.js';
4+
import { URL } from 'node:url';
45
import { loadApplicationCommandRegistriesListeners } from '../optional-listeners/application-command-registries-listeners/_load';
56
import { loadErrorListeners } from '../optional-listeners/error-listeners/_load';
67
import { loadMessageCommandListeners } from '../optional-listeners/message-command-listeners/_load';

‎src/lib/structures/CommandStore.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { AliasStore } from '@sapphire/pieces';
2+
import type { Args } from '../parsers/Args';
23
import { RegisterBehavior } from '../types/Enums';
34
import {
45
allGuildIdsToFetchCommandsFor,
@@ -28,7 +29,7 @@ export class CommandStore extends AliasStore<Command, 'commands'> {
2829
return [...categories] as string[];
2930
}
3031

31-
public override unload(name: string | Command) {
32+
public override unload(name: string | Command): Promise<Command<Args, Command.Options>> {
3233
const piece = this.resolve(name);
3334

3435
// Remove the aliases from the store

‎src/lib/utils/application-commands/ApplicationCommandRegistry.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ import {
1919
type MessageApplicationCommandData,
2020
type UserApplicationCommandData
2121
} from 'discord.js';
22+
import type { Args } from '../../parsers/Args';
23+
import type { Command } from '../../structures/Command';
24+
import type { CommandOptions } from '../../types/CommandTypes';
2225
import { InternalRegistryAPIType, RegisterBehavior } from '../../types/Enums';
2326
import { allGuildIdsToFetchCommandsFor, getDefaultBehaviorWhenNotIdentical, getDefaultGuildIds } from './ApplicationCommandRegistries';
2427
import type { CommandDifference } from './compute-differences/_shared';
@@ -88,7 +91,7 @@ export class ApplicationCommandRegistry {
8891
this.commandName = commandName;
8992
}
9093

91-
public get command() {
94+
public get command(): Command<Args, CommandOptions> | undefined {
9295
return container.stores.get('commands').get(this.commandName);
9396
}
9497

‎src/preconditions/Cooldown.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export interface CooldownPreconditionContext extends AllFlowsPrecondition.Contex
2222
}
2323

2424
export class CorePrecondition extends AllFlowsPrecondition {
25-
public buckets = new WeakMap<Command, RateLimitManager<string>>();
25+
public buckets: WeakMap<Command, RateLimitManager<string>> = new WeakMap<Command, RateLimitManager<string>>();
2626

2727
public messageRun(message: Message, command: Command, context: CooldownPreconditionContext): AllFlowsPrecondition.Result {
2828
const cooldownId = this.getIdFromMessage(message, context);

‎yarn.lock

+1-34
Original file line numberDiff line numberDiff line change
@@ -1155,7 +1155,6 @@ __metadata:
11551155
lint-staged: "npm:^15.2.2"
11561156
prettier: "npm:^3.2.5"
11571157
tsup: "npm:^8.0.2"
1158-
tsx: "npm:^4.7.1"
11591158
typedoc: "npm:^0.25.12"
11601159
typedoc-json-parser: "npm:^9.0.1"
11611160
typescript: "npm:^5.4.3"
@@ -2699,7 +2698,7 @@ __metadata:
26992698
languageName: node
27002699
linkType: hard
27012700

2702-
"esbuild@npm:^0.19.2, esbuild@npm:~0.19.10":
2701+
"esbuild@npm:^0.19.2":
27032702
version: 0.19.12
27042703
resolution: "esbuild@npm:0.19.12"
27052704
dependencies:
@@ -3387,15 +3386,6 @@ __metadata:
33873386
languageName: node
33883387
linkType: hard
33893388

3390-
"get-tsconfig@npm:^4.7.2":
3391-
version: 4.7.3
3392-
resolution: "get-tsconfig@npm:4.7.3"
3393-
dependencies:
3394-
resolve-pkg-maps: "npm:^1.0.0"
3395-
checksum: 10/7397bb4f8aef936df4d9016555b662dcf5279f3c46428b7c7c1ff5e94ab2b87d018b3dda0f4bc1a28b154d5affd0eac5d014511172c085fd8a9cdff9ea7fe043
3396-
languageName: node
3397-
linkType: hard
3398-
33993389
"git-cliff-darwin-arm64@npm:2.1.2":
34003390
version: 2.1.2
34013391
resolution: "git-cliff-darwin-arm64@npm:2.1.2"
@@ -5364,13 +5354,6 @@ __metadata:
53645354
languageName: node
53655355
linkType: hard
53665356

5367-
"resolve-pkg-maps@npm:^1.0.0":
5368-
version: 1.0.0
5369-
resolution: "resolve-pkg-maps@npm:1.0.0"
5370-
checksum: 10/0763150adf303040c304009231314d1e84c6e5ebfa2d82b7d94e96a6e82bacd1dcc0b58ae257315f3c8adb89a91d8d0f12928241cba2df1680fbe6f60bf99b0e
5371-
languageName: node
5372-
linkType: hard
5373-
53745357
"restore-cursor@npm:^3.1.0":
53755358
version: 3.1.0
53765359
resolution: "restore-cursor@npm:3.1.0"
@@ -6120,22 +6103,6 @@ __metadata:
61206103
languageName: node
61216104
linkType: hard
61226105

6123-
"tsx@npm:^4.7.1":
6124-
version: 4.7.1
6125-
resolution: "tsx@npm:4.7.1"
6126-
dependencies:
6127-
esbuild: "npm:~0.19.10"
6128-
fsevents: "npm:~2.3.3"
6129-
get-tsconfig: "npm:^4.7.2"
6130-
dependenciesMeta:
6131-
fsevents:
6132-
optional: true
6133-
bin:
6134-
tsx: dist/cli.mjs
6135-
checksum: 10/3a462b595f31ae58b31f9c6e8c450577dc87660b1225012bd972b6b58d7d2f6c4034728763ebc53bb731acff68de8b0fa50586e4c1ec4c086226f1788ccf9b7d
6136-
languageName: node
6137-
linkType: hard
6138-
61396106
"type-check@npm:^0.4.0, type-check@npm:~0.4.0":
61406107
version: 0.4.0
61416108
resolution: "type-check@npm:0.4.0"

0 commit comments

Comments
 (0)
Please sign in to comment.