Skip to content

Commit

Permalink
docs: update typedoc setup
Browse files Browse the repository at this point in the history
  • Loading branch information
favna committed Apr 10, 2022
1 parent b2ad0c8 commit 5c855bd
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 27 deletions.
1 change: 0 additions & 1 deletion packages/api/package.json
Expand Up @@ -7,7 +7,6 @@
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"typedocMain": "src/index.ts",
"exports": {
".": {
"import": "./dist/index.mjs",
Expand Down
1 change: 0 additions & 1 deletion packages/editable-commands/package.json
Expand Up @@ -7,7 +7,6 @@
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"typedocMain": "src/index.ts",
"exports": {
".": {
"import": "./dist/index.mjs",
Expand Down
1 change: 0 additions & 1 deletion packages/hmr/package.json
Expand Up @@ -7,7 +7,6 @@
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"typedocMain": "src/index.ts",
"exports": {
".": {
"import": "./dist/index.mjs",
Expand Down
1 change: 0 additions & 1 deletion packages/i18next/package.json
Expand Up @@ -7,7 +7,6 @@
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"typedocMain": "src/index.ts",
"exports": {
".": {
"import": "./dist/index.mjs",
Expand Down
1 change: 0 additions & 1 deletion packages/logger/package.json
Expand Up @@ -7,7 +7,6 @@
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"typedocMain": "src/index.ts",
"exports": {
".": {
"import": "./dist/index.mjs",
Expand Down
1 change: 0 additions & 1 deletion packages/pattern-commands/package.json
Expand Up @@ -7,7 +7,6 @@
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"typedocMain": "src/index.ts",
"exports": {
".": {
"import": "./dist/index.mjs",
Expand Down
@@ -1,4 +1,4 @@
import { Listener } from '@sapphire/framework';
import { Listener, type PreconditionStore } from '@sapphire/framework';
import type { PieceContext } from '@sapphire/pieces';
import { PatternCommandEvents } from '../lib/utils/PaternCommandEvents';
import type { PatternPreCommandRunPayload } from '../lib/utils/PatternCommandInterfaces';
Expand All @@ -12,7 +12,7 @@ export class PreCommandRunListener extends Listener<typeof PatternCommandEvents.
const { message, command } = payload;

// Run global preconditions:
const globalResult = await this.container.stores.get('preconditions').run(message, command, payload as any);
const globalResult = await (this.container.stores.get('preconditions') as unknown as PreconditionStore).run(message, command, payload as any);
if (!globalResult.success) {
message.client.emit(PatternCommandEvents.CommandDenied, globalResult.error, payload);
return;
Expand Down
1 change: 0 additions & 1 deletion packages/scheduled-tasks/package.json
Expand Up @@ -7,7 +7,6 @@
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"typedocMain": "src/index.ts",
"exports": {
".": {
"import": "./dist/index.mjs",
Expand Down
2 changes: 1 addition & 1 deletion packages/scheduled-tasks/src/lib/ScheduledTaskHandler.ts
Expand Up @@ -98,6 +98,6 @@ export class ScheduledTaskHandler {
}

private get store(): ScheduledTaskStore {
return container.client.stores.get('scheduled-tasks');
return container.client.stores.get('scheduled-tasks') as unknown as ScheduledTaskStore;
}
}
1 change: 0 additions & 1 deletion packages/subcommands/package.json
Expand Up @@ -7,7 +7,6 @@
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"typedocMain": "src/index.ts",
"exports": {
".": {
"import": "./dist/index.mjs",
Expand Down
4 changes: 2 additions & 2 deletions packages/subcommands/src/lib/SubCommandEntryCommand.ts
@@ -1,4 +1,4 @@
import { Args, Command, container } from '@sapphire/framework';
import { Args, Command, container, type CommandStore } from '@sapphire/framework';
import { SubCommandEntry } from './SubCommandEntry';

/**
Expand All @@ -17,7 +17,7 @@ export class SubCommandEntryCommand<ArgType extends Args = Args, CommandType ext
CommandType
> {
public messageRun(context: SubCommandEntry.MessageRunContext<ArgType, CommandType>): unknown {
const command = container.stores.get('commands').get(this.output);
const command = (container.stores.get('commands') as unknown as CommandStore).get(this.output);
if (command) return command.messageRun(context.message, context.args, context.context);
throw new ReferenceError(`The command '${this.input}' does not exist.`);
}
Expand Down
4 changes: 4 additions & 0 deletions tsconfig.dev.json
@@ -0,0 +1,4 @@
{
"extends": "./tsconfig.base.json",
"exclude": ["**/dist/**/*", "**/register*", "**/tests/**/*"]
}
27 changes: 13 additions & 14 deletions typedoc.json
@@ -1,19 +1,18 @@
{
"cleanOutputDir": true,
"emit": true,
"entryPointStrategy": "packages",
"entryPoints": ["."],
"exclude": [
"**/*.js",
"**/*.test.ts",
"**/dist/**",
"**/jest.config.ts",
"**/node_modules/**",
"**/rollup.config.ts",
"packages/**/register*",
"packages/**/tests/**"
"entryPointStrategy": "resolve",
"entryPoints": [
"packages/api/src/index.ts",
"packages/editable-commands/src/index.ts",
"packages/hmr/src/index.ts",
"packages/i18next/src/index.ts",
"packages/logger/src/index.ts",
"packages/pattern-commands/src/index.ts",
"packages/scheduled-tasks/src/index.ts",
"packages/subcommands/src/index.ts"
],
"excludeExternals": false,
"excludeExternals": true,
"externalPattern": ["node_modules/@types/**"],
"hideGenerator": true,
"lightHighlightTheme": "github-light",
"darkHighlightTheme": "github-dark",
Expand All @@ -25,5 +24,5 @@
"name": "Sapphire Plugins",
"out": "./docs/",
"readme": "./README.md",
"tsconfig": "./tsconfig.base.json"
"tsconfig": "./tsconfig.dev.json"
}

0 comments on commit 5c855bd

Please sign in to comment.