Set props as optional

This commit is contained in:
Arnaud 2025-03-28 11:30:51 +01:00
parent 9e89c30562
commit 54dca841f1
No known key found for this signature in database
GPG Key ID: 69D6CE281FCAE663

View File

@ -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;
}
}