build: switch to bundler moduleResolution

This commit is contained in:
iCrawl
2023-05-01 13:14:13 +02:00
parent 8b71f44b1f
commit 48cab844d4
53 changed files with 186 additions and 79 deletions

View File

@@ -101,6 +101,7 @@ describe('Button Components', () => {
button.toJSON();
}).toThrowError();
// @ts-expect-error: Invalid style
expect(() => buttonComponent().setStyle(24)).toThrowError();
expect(() => buttonComponent().setLabel(longStr)).toThrowError();
// @ts-expect-error: Invalid parameter for disabled

View File

@@ -240,8 +240,10 @@ describe('Slash Commands', () => {
});
test('GIVEN a builder with valid channel options and channel_types THEN does throw an error', () => {
// @ts-expect-error: Invalid channel type
expect(() => getBuilder().addChannelOption(getChannelOption().addChannelTypes(100))).toThrowError();
// @ts-expect-error: Invalid channel types
expect(() => getBuilder().addChannelOption(getChannelOption().addChannelTypes(100, 200))).toThrowError();
});

View File

@@ -18,9 +18,9 @@
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"types": "./dist/index.d.ts"
"require": "./dist/index.js"
},
"directories": {
"lib": "src",