mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-01 20:46:08 +00:00
hotfix: typescript type safety is a joke
This commit is contained in:
parent
1b231d504d
commit
4b8c59bcff
3
.gitignore
vendored
3
.gitignore
vendored
@ -8,6 +8,9 @@ bot/
|
||||
# Enviorment
|
||||
.env
|
||||
|
||||
# bun
|
||||
bun-test.js
|
||||
|
||||
# NPM
|
||||
npm/
|
||||
|
||||
|
@ -73,7 +73,7 @@ export class DefaultRestAdapter implements RestAdapter {
|
||||
private url: string;
|
||||
|
||||
constructor(options: DefaultRestOptions) {
|
||||
this.options = Object.assign(options, DefaultRestAdapter.DEFAULTS);
|
||||
this.options = Object.assign(Object.create(DefaultRestAdapter.DEFAULTS), options);
|
||||
|
||||
if (this.options.url) {
|
||||
this.url = `${options.url}/v${this.options.version}`;
|
||||
|
@ -50,7 +50,7 @@ export class DefaultWsAdapter implements WsAdapter {
|
||||
agent: Agent;
|
||||
|
||||
constructor(options: DefaultWsOptions) {
|
||||
this.options = Object.assign(options, DefaultWsAdapter.DEFAULTS);
|
||||
this.options = Object.assign(Object.create(DefaultWsAdapter.DEFAULTS), options);
|
||||
|
||||
this.agent = new Agent({
|
||||
totalShards: this.options.totalShards ?? 1,
|
||||
|
Loading…
x
Reference in New Issue
Block a user