discordx-ts / discordx

🤖 Create a discord bot with TypeScript and Decorators!
https://discordx.js.org
Apache License 2.0
588 stars 50 forks source link

[Bug]: Invalid Return Type #954

Closed britneygx closed 11 months ago

britneygx commented 11 months ago

What happened?

In the discordx/importer package, the Typescript definition for the resolve function should return Promise<string[]> rather than its current value of string[].

Reproduction

import { resolve } from "@discordx/importer";
const pluginPaths = await resolve(`plugins/*`);

Typescript returns the following warning: 'await' has no effect on the type of this expression.ts(80007)

Package

@discordx/importer

Version

Stable

Relevant log output

No response

Code of Conduct

samarmeena commented 11 months ago

Thank you for reporting this issue!!!