mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-02 21:16:09 +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
|
# Enviorment
|
||||||
.env
|
.env
|
||||||
|
|
||||||
|
# bun
|
||||||
|
bun-test.js
|
||||||
|
|
||||||
# NPM
|
# NPM
|
||||||
npm/
|
npm/
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ export class DefaultRestAdapter implements RestAdapter {
|
|||||||
private url: string;
|
private url: string;
|
||||||
|
|
||||||
constructor(options: DefaultRestOptions) {
|
constructor(options: DefaultRestOptions) {
|
||||||
this.options = Object.assign(options, DefaultRestAdapter.DEFAULTS);
|
this.options = Object.assign(Object.create(DefaultRestAdapter.DEFAULTS), options);
|
||||||
|
|
||||||
if (this.options.url) {
|
if (this.options.url) {
|
||||||
this.url = `${options.url}/v${this.options.version}`;
|
this.url = `${options.url}/v${this.options.version}`;
|
||||||
|
@ -50,7 +50,7 @@ export class DefaultWsAdapter implements WsAdapter {
|
|||||||
agent: Agent;
|
agent: Agent;
|
||||||
|
|
||||||
constructor(options: DefaultWsOptions) {
|
constructor(options: DefaultWsOptions) {
|
||||||
this.options = Object.assign(options, DefaultWsAdapter.DEFAULTS);
|
this.options = Object.assign(Object.create(DefaultWsAdapter.DEFAULTS), options);
|
||||||
|
|
||||||
this.agent = new Agent({
|
this.agent = new Agent({
|
||||||
totalShards: this.options.totalShards ?? 1,
|
totalShards: this.options.totalShards ?? 1,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user