Skip to content
This repository has been archived by the owner on Jan 8, 2022. It is now read-only.

(types): ApplicationCommandNumberOptionBase is not extending base properly #67

Open
papsavas opened this issue Dec 24, 2021 · 7 comments
Labels
bug Something isn't working dependencies has PR

Comments

@papsavas
Copy link

Issue description

Since the 13.4.0 Djs release, compiling to js fails due to this error:

node_modules/@discordjs/builders/dist/index.d.ts(516,5): error TS2416: Property 'toJSON' in type 'ApplicationCommandNumberOptionBase' is not assignable to the same property in base type 'ApplicationCommandOptionWithChoicesBase<number>'.
         Type '() => { min_value: number; max_value: number; type: ApplicationCommandOptionType.String | ApplicationCommandOptionType.Integer | ApplicationCommandOptionType.Number; ... 4 more ...; required?: boolean; } | ... 5 more ... | { ...; }' is not assignable to type '() => APIApplicationCommandOption'.
           Type '{ min_value: number; max_value: number; type: ApplicationCommandOptionType.String | ApplicationCommandOptionType.Integer | ApplicationCommandOptionType.Number; ... 4 more ...; required?: boolean; } | ... 5 more ... | { ...; }' is not assignable to type 'APIApplicationCommandOption'.
             Type '{ min_value: number; max_value: number; type: ApplicationCommandOptionType.Subcommand | ApplicationCommandOptionType.SubcommandGroup; options?: APIApplicationCommandOption[]; name: string; description: string; required?: boolean; autocomplete?: undefined; }' is not assignable to type 'APIApplicationCommandOption'.
               Type '{ min_value: number; max_value: number; type: ApplicationCommandOptionType.Subcommand | ApplicationCommandOptionType.SubcommandGroup; options?: APIApplicationCommandOption[]; name: string; description: string; required?: boolean; autocomplete?: undefined; }' is not assignable to type 'APIApplicationCommandNumericAutocompleteOptions'.
                 Types of property 'type' are incompatible.
                   Type 'ApplicationCommandOptionType.Subcommand | ApplicationCommandOptionType.SubcommandGroup' is not assignable to type 'ApplicationCommandOptionType.Integer | ApplicationCommandOptionType.Number'.
                     Type 'ApplicationCommandOptionType.Subcommand' is not assignable to type 'ApplicationCommandOptionType.Integer | ApplicationCommandOptionType.Number'.

Code sample

No response

@discordjs/builders version

0.10.0

Node.js version

nodejs: 16.6.1, typescript: 4.5.4

Operating system

No response

Priority this issue should have

High (immediate attention needed)

@papsavas papsavas added bug Something isn't working need repro labels Dec 24, 2021
@vladfrangu
Copy link
Member

vladfrangu commented Dec 24, 2021

Expected, conflicting versions of discord-api-types happened :(
We're planning on fixing this very soon! It's an internal issue that needs to be cleaned up

@pixeldev
Copy link

Hey! Will this be fixed soon?

@vladfrangu
Copy link
Member

I think this has already been fixed with the latest PR! Just needs to be published

@pixeldev
Copy link

Oh, then I'm waiting (i really need it );)

@S222em
Copy link

S222em commented Dec 29, 2021

Todays release did not fix the issue for me. You were talking about #68?

@vladfrangu
Copy link
Member

Yep! Make sure you installed the latest version of builders 👀

@S222em
Copy link

S222em commented Dec 29, 2021

Yep! Make sure you installed the latest version of builders 👀

My bad, another non-discordjs related problem popped up.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working dependencies has PR
Projects
None yet
Development

No branches or pull requests

4 participants