mirror of
https://github.com/logos-storage/logos-storage-js.git
synced 2026-01-02 13:33:07 +00:00
Set props as optional
This commit is contained in:
parent
9e89c30562
commit
54dca841f1
@ -28,15 +28,15 @@ export class Codex {
|
||||
private _debug: CodexDebug | null;
|
||||
private readonly auth: FetchAuth = {};
|
||||
|
||||
constructor(url: string, { auth }: CodexProps) {
|
||||
constructor(url: string, options?: CodexProps) {
|
||||
this.url = url;
|
||||
this._marketplace = null;
|
||||
this._data = null;
|
||||
this._node = null;
|
||||
this._debug = null;
|
||||
|
||||
if (auth) {
|
||||
this.auth = auth;
|
||||
if (options?.auth) {
|
||||
this.auth = options?.auth;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user