I prefer semicolors, they also help avoiding certain pitfalls in JavaScript/TypeScript, such as the following code sample:
```js
const xyz = "test"
(something.else as string) = "another"
```
This results in a TypeError: "test" is not a function, this is because js thinks we are trying to call the string "test" as a function.
To fix this it requires a `;` somewhere before the `(`, such as `;(something ... ` which in my opinion is ugly and less clean overall.
Currently we import from `index.js` files where we could simply import the actual file(s) or module we need.
This also creates a bit of confusion since it isn't obvious from where stuff is coming from, especially when we are importing types such as `Discord<XYZ>` types both from `@discordeno/types` and a `index.js` in the same file, one such example is `transformers/reverse/component.ts`.
As far as I can tell, this does not have any specific advantage beside readability, maybe something with tree-shaking. (and for us, tree-shaking doesn't really matter)
The only files that still import index.js files are:
- index.js files themself
- bot/src/handlers.js since it does a `import * as handlers from './handlers/index.js'` and the alternative is like 90 lines of imports
Co-authored-by: Link <link20050703@gmail.com>
* Add type helpers for typeLevel based desired props
This also fixes / added a few stuff that was missing in exiting
types & transformers, however due to this a few transformers got a
breaking change due to the need to pass down the shardId
* Fix benchmark type error
* Add the generics to createBot / Bot / ..
This caused a lot of breaking changed due to the required generics on a
bunch of types
* Fix benchmark type error?
* Fix benchmarks type error
* Fix E2E test type error
* remove defaultDesiredPropertiesValue
* Remove `internal` jsdoc from CompleteDesiredProprieties
* Add tests for createDesiredPropertiesObject
* Fix interaction.bot type
* Remove Capitalize type helper
It is already built-in into typescript as an intrinsic
* Fix typo
* Update message on missing desired properties
* Fix CI
* Move infer types to 'transformers.$inferredTypes'
* Fix CI
* Fix CI, again
* Use GatewayHandlers in params of create function
* change default behavior to remove key
* Fix CI
* fix types for e2e test
* add guild safety | closes#3020
* Adds approx guild count | closes#3078
* Team member permissions | closes#3105
According to current documentation DiscordTeamMemberRole#Owner does not have a value anymore, in this commit it still had so it is included to be changed by a later commit
* Default thread ratelimit | closes#3216
* Entitlements and SKUs | closes#3219
The entitlements events needs testing for the typing
* Typing endpoint docs update | closes#3222
* Add guildScheduledEventId to CreateStageInstance | closes#3228
* Add listSkus helper
I did forget it in the commit before
* Update Application Endpoints | closes#3230
* Update documentation | closes#3233
* fix starting a thread in forum | closes#3234 & closes#3036
* Add fired events on get widget endpoint | closes#3235
* Add fired events on get widget endpoint pt2 | closes#3236
* Update SKU and Entitlement fields | closes#3238
* Split permissions for expressions and events | closes#3249
* Make GetEntitlements#excludeEnded more specific | closes#3251
* Fix thread/forum channel docs regression | closes#3252
* Another description change for GetEntitlements#excludeEnded | closes#3253
* Document applied_tags on Execute Webhook | closes#3265
* Fix entitlement event types
* fix: Fixed an issue which would cause the 'INVITE_DELETE' event to be passed into 'INVITE_CREATE'.
* chore: updated guild counts for appy and ai image generator
* chore: removed duplicate line in the message transformer